Skip to content

Commit 6cc3df3

Browse files
authored
Merge pull request #41 from AOSSIE-Org/fix/ci-pr38-mock-json
fix: unbreak Python Tests after PR #38 json= client.request
2 parents 16e5f4a + b569740 commit 6cc3df3

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

tests/test_github_ingestion_comments.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ class _MockClient:
1212
def __init__(self, routes: dict[str, list]) -> None:
1313
self._routes = routes
1414

15-
def request(self, method: str, path: str, params: dict | None = None) -> httpx.Response:
15+
def request(
16+
self, method: str, path: str, params: dict | None = None, **kwargs: object
17+
) -> httpx.Response:
1618
data = self._routes.get(path, [])
1719
headers = {"X-RateLimit-Remaining": "10"}
1820
return httpx.Response(200, json=data, headers=headers)

tests/test_github_ingestion_lifecycle_events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ class _MockClient:
1616
def __init__(self, routes: dict[str, list]) -> None:
1717
self._routes = routes
1818

19-
def request(self, method: str, path: str, params: dict | None = None) -> httpx.Response:
19+
def request(
20+
self, method: str, path: str, params: dict | None = None, **kwargs: object
21+
) -> httpx.Response:
2022
data = self._routes.get(path, [])
2123
headers = {"X-RateLimit-Remaining": "10"}
2224
return httpx.Response(200, json=data, headers=headers)

tests/test_github_rate_limit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ def __init__(self, outcomes: list[httpx.Response | Exception]) -> None:
1414
self._outcomes = list(outcomes)
1515
self.call_count = 0
1616

17-
def request(self, method: str, path: str, params: dict | None = None) -> httpx.Response:
17+
def request(
18+
self, method: str, path: str, params: dict | None = None, **kwargs: object
19+
) -> httpx.Response:
1820
self.call_count += 1
1921
outcome = self._outcomes.pop(0)
2022
if isinstance(outcome, Exception):

tests/test_github_retry.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ def __init__(self, outcomes: list[httpx.Response | Exception]) -> None:
1111
self._outcomes = list(outcomes)
1212
self.call_count = 0
1313

14-
def request(self, method: str, path: str, params: dict | None = None) -> httpx.Response:
14+
def request(
15+
self, method: str, path: str, params: dict | None = None, **kwargs: object
16+
) -> httpx.Response:
1517
self.call_count += 1
1618
outcome = self._outcomes.pop(0)
1719
if isinstance(outcome, Exception):

0 commit comments

Comments
 (0)