Skip to content

Commit 90f3f02

Browse files
committed
refactor(client): rename list team source to better match public api doc
1 parent 463062c commit 90f3f02

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pygitguardian/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ def list_sources(
12361236
obj.status_code
12371237
return obj
12381238

1239-
def list_teams_sources(
1239+
def list_team_sources(
12401240
self,
12411241
team_id: int,
12421242
parameters: Optional[TeamSourceParameters] = None,

tests/test_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ def test_list_team_sources(client: GGClient, get_team: Callable[[], Team]):
18611861
THEN a paginated list of sources is returned
18621862
"""
18631863

1864-
result = client.list_teams_sources(get_team().id)
1864+
result = client.list_team_sources(get_team().id)
18651865
assert isinstance(result, CursorPaginatedResponse), result
18661866

18671867
# This assumes at least one source has been installed and is on the perimeter of a team
@@ -1877,7 +1877,7 @@ def test_search_team_sources(client: GGClient, get_team: Callable[[], Team]):
18771877
THEN a paginated list of sources is returned matching the parameters
18781878
"""
18791879

1880-
result = client.list_teams_sources(
1880+
result = client.list_team_sources(
18811881
get_team().id, TeamSourceParameters(type="azure_devops")
18821882
)
18831883

@@ -1894,7 +1894,7 @@ def test_delete_team_sources(client: GGClient, get_team: Callable[[], Team]):
18941894
"""
18951895

18961896
team = get_team()
1897-
team_sources = client.list_teams_sources(team.id)
1897+
team_sources = client.list_team_sources(team.id)
18981898
assert isinstance(
18991899
team_sources, CursorPaginatedResponse
19001900
), "Could not fetch team sources"
@@ -1905,7 +1905,7 @@ def test_delete_team_sources(client: GGClient, get_team: Callable[[], Team]):
19051905

19061906
assert result == 204
19071907

1908-
team_sources = client.list_teams_sources(team.id)
1908+
team_sources = client.list_team_sources(team.id)
19091909
assert isinstance(team_sources, CursorPaginatedResponse), team_sources
19101910
assert not any(source.id == source_to_delete.id for source in team_sources.data)
19111911

@@ -1929,7 +1929,7 @@ def test_add_team_sources(
19291929

19301930
assert result == 204
19311931

1932-
team_sources = client.list_teams_sources(
1932+
team_sources = client.list_team_sources(
19331933
team.id, TeamSourceParameters(type="azure_devops")
19341934
)
19351935
assert isinstance(team_sources, CursorPaginatedResponse), team_sources

0 commit comments

Comments
 (0)