Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

fix(tests): mock the function the code actually calls so the suite stops hitting the real macOS Keychain (#541)

David Shraderb43c7f43e2e5
diff --git a/tests/test_chrome_cookies.py b/tests/test_chrome_cookies.py
index abbb077c..d359dc85 100644
--- a/tests/test_chrome_cookies.py
+++ b/tests/test_chrome_cookies.py
@@ -253,7 +253,7 @@ class TestUnencryptedCookies:
with mock.patch("lib.chrome_cookies.CHROME_COOKIES_DB", Path(db_path)):
# No keychain needed for unencrypted values
- with mock.patch("lib.chrome_cookies._get_chrome_encryption_key", return_value=None):
+ with mock.patch("lib.chrome_cookies._get_chromium_encryption_key", return_value=None):
result = extract_chrome_cookies_macos(".x.com", ["auth_token", "ct0"])
assert result == {"auth_token": "plain_token_value", "ct0": "plain_ct0_value"}
@@ -297,7 +297,7 @@ class TestFullExtraction:
])
with mock.patch("lib.chrome_cookies.CHROME_COOKIES_DB", Path(db_path)):
- with mock.patch("lib.chrome_cookies._get_chrome_encryption_key", return_value=None):
+ with mock.patch("lib.chrome_cookies._get_chromium_encryption_key", return_value=None):
result = extract_chrome_cookies_macos(".x.com", ["auth_token"])
assert result is None