Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
test: Adds a unittest for this
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Dec 21, 2023
1 parent 778879a commit b32a369
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,30 @@ async def test_githubclient_fetch_pull_comments_from_repo(repo_name, status_code
github_client.fetch_pull_comments_from_repo(repo_name, num_pulls=1)


@pytest.mark.parametrize(
("comments", "expected_output"),
[
# cf. https://github.com/StanGirard/quivr/pull/1883
(
[
{"id": 1425674031},
{"id": 1425677116},
{"id": 1425684351},
{"id": 1425692412},
{"id": 1425694380, "in_reply_to_id": 1425692412},
{"id": 1425696753},
{"id": 1425696853, "in_reply_to_id": 1425696753},
{"id": 1426417539, "in_reply_to_id": 1425684351},
],
[[1425674031], [1425677116], [1425684351, 1426417539], [1425692412, 1425694380], [1425696753, 1425696853]],
),
],
)
@pytest.mark.asyncio()
async def test_githubclient_arrange_in_threads(comments, expected_output):
assert GitHubClient.arrange_in_threads(comments) == expected_output


@pytest.mark.parametrize(
("func", "arr", "output"),
[
Expand Down

0 comments on commit b32a369

Please sign in to comment.