aboutsummaryrefslogtreecommitdiff
path: root/tests/test_git_repository_cache.py
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-05-03 19:39:08 -0500
committerChristian Cleberg <[email protected]>2026-05-03 19:39:08 -0500
commitfdfb7831fe7dba6d17a1697c7cbb731fd008ba7b (patch)
treea161d0840809bcdd1f64e5da74fb93b1aea3faaa /tests/test_git_repository_cache.py
parent4390684995c9933f213faec2cb20f39af6d506d2 (diff)
downloadhutch-stats-fdfb7831fe7dba6d17a1697c7cbb731fd008ba7b.tar.gz
hutch-stats-fdfb7831fe7dba6d17a1697c7cbb731fd008ba7b.tar.bz2
hutch-stats-fdfb7831fe7dba6d17a1697c7cbb731fd008ba7b.zip
fix: ensure git crawling accounts for all branches
Diffstat (limited to 'tests/test_git_repository_cache.py')
-rw-r--r--tests/test_git_repository_cache.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_git_repository_cache.py b/tests/test_git_repository_cache.py
index 98a3db3..9326e6f 100644
--- a/tests/test_git_repository_cache.py
+++ b/tests/test_git_repository_cache.py
@@ -96,6 +96,7 @@ def test_git_poll_reuses_cached_discovered_repositories(db_session) -> None:
poller = PollerService(todo_service=todo_service, git_service=git_service, settings=settings)
first_inserted = poller.poll_all(db_session, "~ccleberg")
+ first_poll_user_repository_calls = [call for call in client.calls if "query UserRepositories" in call[0]]
second_inserted = poller.poll_all(db_session, "~ccleberg")
user_repository_calls = [call for call in client.calls if "query UserRepositories" in call[0]]
@@ -103,5 +104,5 @@ def test_git_poll_reuses_cached_discovered_repositories(db_session) -> None:
assert first_inserted == 1
assert second_inserted == 0
- assert len(user_repository_calls) == 1
+ assert len(user_repository_calls) == len(first_poll_user_repository_calls)
assert cached_names == ["~ccleberg/Hutch"]