diff options
| author | Christian Cleberg <[email protected]> | 2026-05-06 22:09:56 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-05-06 22:09:56 -0500 |
| commit | 1ae229d64bee19e94bbfd1872879b86496d68104 (patch) | |
| tree | cb187f435df234f0bc2f77ebe1ddae5842c6d0ac /tests/test_git_repository_cache.py | |
| parent | fdfb7831fe7dba6d17a1697c7cbb731fd008ba7b (diff) | |
| download | hutch-stats-1ae229d64bee19e94bbfd1872879b86496d68104.tar.gz hutch-stats-1ae229d64bee19e94bbfd1872879b86496d68104.tar.bz2 hutch-stats-1ae229d64bee19e94bbfd1872879b86496d68104.zip | |
feat: index git activity across all SourceHut branches
Diffstat (limited to 'tests/test_git_repository_cache.py')
| -rw-r--r-- | tests/test_git_repository_cache.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_git_repository_cache.py b/tests/test_git_repository_cache.py index 9326e6f..508f668 100644 --- a/tests/test_git_repository_cache.py +++ b/tests/test_git_repository_cache.py @@ -40,6 +40,19 @@ def make_settings(**overrides) -> Settings: return Settings(**values) +def branch_payload(*branches: str) -> dict: + return { + "user": { + "repository": { + "references": { + "results": [{"name": branch, "target": "abc123"} for branch in branches], + "cursor": None, + } + } + } + } + + def test_git_poll_reuses_cached_discovered_repositories(db_session) -> None: settings = make_settings() client = StubClient( @@ -58,6 +71,7 @@ def test_git_poll_reuses_cached_discovered_repositories(db_session) -> None: } } }, + "query RepositoryBranches": branch_payload("refs/heads/main"), "query RepositoryLog": { "user": { "repository": { |
