44from collections import OrderedDict
55from datetime import date
66from io import BytesIO
7- from typing import Any , Callable , Dict , List , Optional , Tuple , Type
7+ from typing import Any , Dict , List , Optional , Tuple , Type
88from unittest .mock import Mock , patch
99
1010import pytest
6767)
6868
6969from .conftest import create_client , my_vcr
70+ from .utils import get_invitation , get_source , get_team
7071
7172
7273FILENAME = ".env"
@@ -1525,7 +1526,7 @@ def test_create_team(client: GGClient):
15251526
15261527
15271528@my_vcr .use_cassette ("test_get_team.yaml" , ignore_localhost = False )
1528- def test_get_team (client : GGClient , get_team : Callable [[], Team ] ):
1529+ def test_get_team (client : GGClient ):
15291530 """
15301531 GIVEN a client
15311532 WHEN calling GET /teams/{id} endpoint
@@ -1541,7 +1542,7 @@ def test_get_team(client: GGClient, get_team: Callable[[], Team]):
15411542
15421543
15431544@my_vcr .use_cassette ("test_update_team.yaml" , ignore_localhost = False )
1544- def test_update_team (client : GGClient , get_team : Callable [[], Team ] ):
1545+ def test_update_team (client : GGClient ):
15451546 """
15461547 GIVEN a client
15471548 WHEN calling PATCH /teams endpoint
@@ -1592,7 +1593,7 @@ def test_global_team(client: GGClient):
15921593
15931594
15941595@my_vcr .use_cassette ("test_delete_team.yaml" , ignore_localhost = False )
1595- def test_delete_team (client : GGClient , get_team : Callable [[], Team ] ):
1596+ def test_delete_team (client : GGClient ):
15961597 """
15971598 GIVEN a client
15981599 WHEN calling DELETE /teams/{id} endpoint
@@ -1606,11 +1607,7 @@ def test_delete_team(client: GGClient, get_team: Callable[[], Team]):
16061607
16071608
16081609@my_vcr .use_cassette ("test_create_team_invitation.yaml" , ignore_localhost = False )
1609- def test_create_team_invitation (
1610- client : GGClient ,
1611- get_team : Callable [[], Team ],
1612- get_invitation : Callable [[], Invitation ],
1613- ):
1610+ def test_create_team_invitation (client : GGClient ):
16141611 """
16151612 GIVEN a client
16161613 WHEN calling POST /teams/{id}/invitations endpoint
@@ -1633,7 +1630,7 @@ def test_create_team_invitation(
16331630
16341631
16351632@my_vcr .use_cassette ("test_list_team_invitations.yaml" , ignore_localhost = False )
1636- def test_list_team_invitations (client : GGClient , get_team : Callable [[], Team ] ):
1633+ def test_list_team_invitations (client : GGClient ):
16371634 """
16381635 GIVEN a client
16391636 WHEN calling GET /teams/{id}/invitations endpoint
@@ -1649,7 +1646,7 @@ def test_list_team_invitations(client: GGClient, get_team: Callable[[], Team]):
16491646
16501647
16511648@my_vcr .use_cassette ("test_search_team_invitations.yaml" , ignore_localhost = False )
1652- def test_search_team_invitations (client : GGClient , get_team : Callable [[], Team ] ):
1649+ def test_search_team_invitations (client : GGClient ):
16531650 """
16541651 GIVEN a client
16551652 WHEN calling GET /teams/{id}/invitations endpoint
@@ -1670,7 +1667,7 @@ def test_search_team_invitations(client: GGClient, get_team: Callable[[], Team])
16701667
16711668
16721669@my_vcr .use_cassette ("test_delete_team_invitation.yaml" , ignore_localhost = False )
1673- def test_delete_team_invitation (client : GGClient , get_team : Callable [[], Team ] ):
1670+ def test_delete_team_invitation (client : GGClient ):
16741671 """
16751672 GIVEN a client
16761673 WHEN calling DELETE /teams/{id}/invitations/{id} endpoint
@@ -1689,7 +1686,7 @@ def test_delete_team_invitation(client: GGClient, get_team: Callable[[], Team]):
16891686
16901687
16911688@my_vcr .use_cassette ("test_list_team_members.yaml" , ignore_localhost = False )
1692- def test_list_team_members (client : GGClient , get_team : Callable [[], Team ] ):
1689+ def test_list_team_members (client : GGClient ):
16931690 """
16941691 GIVEN a client
16951692 WHEN calling GET /teams/{id}/members endpoint
@@ -1704,7 +1701,7 @@ def test_list_team_members(client: GGClient, get_team: Callable[[], Team]):
17041701
17051702
17061703@my_vcr .use_cassette ("test_search_team_members.yaml" , ignore_localhost = False )
1707- def test_search_team_members (client : GGClient , get_team : Callable [[], Team ] ):
1704+ def test_search_team_members (client : GGClient ):
17081705 """
17091706 GIVEN a client
17101707 WHEN calling GET /teams/{id}/members endpoint
@@ -1725,7 +1722,7 @@ def test_search_team_members(client: GGClient, get_team: Callable[[], Team]):
17251722
17261723
17271724@my_vcr .use_cassette ("test_create_team_member.yaml" , ignore_localhost = False )
1728- def test_create_team_member (client : GGClient , get_team : Callable [[], Team ] ):
1725+ def test_create_team_member (client : GGClient ):
17291726 """
17301727 GIVEN a client
17311728 WHEN calling POST /teams/{id}/members endpoint
@@ -1762,9 +1759,7 @@ def test_create_team_member(client: GGClient, get_team: Callable[[], Team]):
17621759
17631760
17641761@my_vcr .use_cassette ("test_create_team_member_parameters.yaml" , ignore_localhost = False )
1765- def test_create_team_member_without_mail (
1766- client : GGClient , get_team : Callable [[], Team ]
1767- ):
1762+ def test_create_team_member_without_mail (client : GGClient ):
17681763 """
17691764 GIVEN a client
17701765 WHEN calling POST /teams/{id}/members endpoint
@@ -1799,7 +1794,7 @@ def test_create_team_member_without_mail(
17991794
18001795
18011796@my_vcr .use_cassette ("test_delete_team_member.yaml" , ignore_localhost = False )
1802- def test_delete_team_member (client : GGClient , get_team : Callable [[], Team ] ):
1797+ def test_delete_team_member (client : GGClient ):
18031798 """
18041799 GIVEN a client
18051800 WHEN calling DELETE /teams/{id}/members/{id} endpoint
@@ -1854,7 +1849,7 @@ def test_search_sources(client: GGClient):
18541849
18551850
18561851@my_vcr .use_cassette ("test_list_teams_sources.yaml" , ignore_localhost = False )
1857- def test_list_team_sources (client : GGClient , get_team : Callable [[], Team ] ):
1852+ def test_list_team_sources (client : GGClient ):
18581853 """
18591854 GIVEN a client
18601855 WHEN calling GET /sources endpoint
@@ -1869,7 +1864,7 @@ def test_list_team_sources(client: GGClient, get_team: Callable[[], Team]):
18691864
18701865
18711866@my_vcr .use_cassette ("test_search_teams_sources.yaml" , ignore_localhost = False )
1872- def test_search_team_sources (client : GGClient , get_team : Callable [[], Team ] ):
1867+ def test_search_team_sources (client : GGClient ):
18731868 """
18741869 GIVEN a client
18751870 WHEN calling GET /sources endpoint
@@ -1886,7 +1881,7 @@ def test_search_team_sources(client: GGClient, get_team: Callable[[], Team]):
18861881
18871882
18881883@my_vcr .use_cassette ("test_delete_team_sources.yaml" , ignore_localhost = False )
1889- def test_delete_team_sources (client : GGClient , get_team : Callable [[], Team ] ):
1884+ def test_delete_team_sources (client : GGClient ):
18901885 """
18911886 GIVEN a client
18921887 WHEN calling POST /teams/{id}/sources endpoint
@@ -1911,9 +1906,7 @@ def test_delete_team_sources(client: GGClient, get_team: Callable[[], Team]):
19111906
19121907
19131908@my_vcr .use_cassette ("test_add_team_sources.yaml" , ignore_localhost = False )
1914- def test_add_team_sources (
1915- client : GGClient , get_team : Callable [[], Team ], get_source : Callable [[], Source ]
1916- ):
1909+ def test_add_team_sources (client : GGClient ):
19171910 """
19181911 GIVEN a client
19191912 WHEN calling POST /teams/{id}/sources endpoint
0 commit comments