mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-03 14:58:51 -06:00
refactor: split core.upstream by subject
HTTP to the forges moves to core.forgehttp, comparisons, trees and clone history to core.upstreamtree. core.upstream keeps repositories, the cache and revisions.
This commit is contained in:
1 parent
ce92eff0aa
commit
263a64c0e0
65 files changed
+1417
-1337
No files matched your search
@@ -974,13 +974,13 @@ class TheGitHubTokenComesFromGh(unittest.TestCase):
|
||||
run.assert_not_called()
|
||||
|
||||
def test_every_api_caller_reads_it(self):
|
||||
from core import upstream
|
||||
from core import forgehttp
|
||||
from profiling.quota import check_quota
|
||||
from scraper import base_scraper
|
||||
|
||||
with self._gh():
|
||||
self.assertEqual(
|
||||
upstream.forge_headers("https://api.github.com/repos/o/n")["Authorization"],
|
||||
forgehttp.forge_headers("https://api.github.com/repos/o/n")["Authorization"],
|
||||
"Bearer gho_fromgh",
|
||||
)
|
||||
os.environ.pop("GITHUB_TOKEN")
|
||||
@@ -992,10 +992,10 @@ class TheGitHubTokenComesFromGh(unittest.TestCase):
|
||||
check_quota(606, offline=False)
|
||||
|
||||
def test_another_forge_never_triggers_gh(self):
|
||||
from core import upstream
|
||||
from core import forgehttp
|
||||
|
||||
with self._gh() as run:
|
||||
headers = upstream.forge_headers("https://gitlab.com/api/v4/projects/1")
|
||||
headers = forgehttp.forge_headers("https://gitlab.com/api/v4/projects/1")
|
||||
self.assertNotIn("Authorization", headers)
|
||||
run.assert_not_called()
|
||||
|
||||
|
||||
Reference in new issue
Block a user