From 63662b203643d635445e2f46f6a2b3431a6f0504 Mon Sep 17 00:00:00 2001 From: Rula Abu Hasna Date: Tue, 23 Jul 2024 12:49:17 +0200 Subject: [PATCH] more tests --- graphql_api/tests/test_repository.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/graphql_api/tests/test_repository.py b/graphql_api/tests/test_repository.py index 43c2a0fb5d..df710e18f7 100644 --- a/graphql_api/tests/test_repository.py +++ b/graphql_api/tests/test_repository.py @@ -843,12 +843,14 @@ def test_branch_filter_on_test_results(self) -> None: ) assert res["testResults"] == {"edges": [{"node": {"name": test.name}}]} - def test_resolve_test_results_count(self) -> None: repo = RepositoryFactory(author=self.owner, active=True, private=True) TestFactory(repository=repo) TestFactory(repository=repo) - res = self.fetch_repository( - repo.name, """testResultsCount""" - ) + res = self.fetch_repository(repo.name, """testResultsCount""") assert res["testResultsCount"] == 2 + + def test_resolve_test_results_count_no_tests(self) -> None: + repo = RepositoryFactory(author=self.owner, active=True, private=True) + res = self.fetch_repository(repo.name, """testResultsCount""") + assert res["testResultsCount"] == 0