@@ -611,11 +611,8 @@ def test_get_trees_for_org_works(self):
611611 installation = self .get_installation_helper ()
612612 self .set_rate_limit (MINIMUM_REQUESTS + 50 )
613613 expected_trees = {
614- "Test-Organization/bar" : RepoTree (Repo ("Test-Organization/bar" , "main" ), []),
615- "Test-Organization/baz" : RepoTree (Repo ("Test-Organization/baz" , "master" ), []),
616614 "Test-Organization/foo" : RepoTree (
617- Repo ("Test-Organization/foo" , "master" ),
618- ["src/sentry/api/endpoints/auth_login.py" ],
615+ Repo ("Test-Organization/foo" , "master" ), ["src/sentry/api/endpoints/auth_login.py" ]
619616 ),
620617 "Test-Organization/xyz" : RepoTree (
621618 Repo ("Test-Organization/xyz" , "master" ), ["src/foo.py" ]
@@ -647,6 +644,7 @@ def test_get_trees_for_org_prevent_exhaustion_some_repos(self):
647644 """Some repos will hit the network but the rest will grab from the cache."""
648645 gh_org = "Test-Organization"
649646 installation = self .get_installation_helper ()
647+
650648 expected_trees = {
651649 f"{ gh_org } /xyz" : RepoTree (Repo (f"{ gh_org } /xyz" , "master" ), ["src/foo.py" ]),
652650 # This will have no files because we will hit the minimum remaining requests floor
@@ -668,8 +666,10 @@ def test_get_trees_for_org_prevent_exhaustion_some_repos(self):
668666 # We reset the remaining values
669667 self .set_rate_limit (remaining = 20 )
670668 trees = installation .get_trees_for_org ()
671- # Now that the rate limit is reset we should get files for foo
672- expected_trees [f"{ gh_org } /foo" ] = RepoTree (
673- Repo (f"{ gh_org } /foo" , "master" ), ["src/sentry/api/endpoints/auth_login.py" ]
674- )
675- assert trees == expected_trees
669+ assert trees == {
670+ f"{ gh_org } /xyz" : RepoTree (Repo (f"{ gh_org } /xyz" , "master" ), ["src/foo.py" ]),
671+ # Now that the rate limit is reset we should get files for foo
672+ f"{ gh_org } /foo" : RepoTree (
673+ Repo (f"{ gh_org } /foo" , "master" ), ["src/sentry/api/endpoints/auth_login.py" ]
674+ ),
675+ }
0 commit comments