test: retarget v2 coverage monkeypatch targets to definition modules after handler split (assertions unchanged)

This commit is contained in:
host committed 2026-11-04 21:03:03 +00:00
1 parent 3a72ed3847
commit 36ddc7a874
7 files changed
+45 -48

No files matched your search

+4 -4
View File
@@ -937,7 +937,7 @@ class MetricsOauthAppTestCase(_Base):
with mock.patch.dict(os.environ, {
"CODEX_GLOBAL_ADMINS": "u1",
"GITHUB_APP_PUBLIC_BASE": "https://api.example.test"}), \
mock.patch("cloud.server.SetupStateStore", _Store):
mock.patch("cloud.handler_oauth.SetupStateStore", _Store):
h._github_app_setup_state()
self.assertEqual(self._last(h)[0], 200)
@@ -981,8 +981,8 @@ class MetricsOauthAppTestCase(_Base):
def consume_state(self, state, allowed_issuers=None):
return True
from cloud.github_app import AppError
with mock.patch("cloud.server.SetupStateStore", _Store), \
mock.patch("cloud.server.exchange_manifest_code",
with mock.patch("cloud.handler_oauth.SetupStateStore", _Store), \
mock.patch("cloud.handler_oauth.exchange_manifest_code",
side_effect=AppError("bad code",
reason="exchange_failed")):
h._github_app_callback()
@@ -998,7 +998,7 @@ class MetricsOauthAppTestCase(_Base):
class FullAutoKeysPushTestCase(_Base):
def test_full_auto_config_plan_error(self):
h = self._h()
with mock.patch("cloud.server.auto_config_plan",
with mock.patch("cloud.handler_fullauto.auto_config_plan",
side_effect=FullAutoError("boom", reason="x")):
h._full_auto_config_plan("u1", {"repo": ["o/r"]})
code, payload = self._last(h)