AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
"""Tests for browser cookie extraction module."""
import configparser
import os
import sqlite3
import textwrap
from pathlib import Path
from typing import Dict, List, Optional, Tuple
from unittest.mock import patch
import pytest
from lib import cookie_extract, env
from lib.cookie_extract import (
extract_cookies,
extract_firefox_cookies,
has_complete_pair,
_query_cookies_db,
_find_default_profile,
_get_firefox_profiles_dir,
)
def test_firefox_database_permission_denial_survives_extractor(tmp_path):
db = tmp_path / "cookies.sqlite"
db.touch()
with patch(
"lib.cookie_extract.copy_snapshot",
side_effect=PermissionError(1, "Operation not permitted", str(db)),
):
with pytest.raises(PermissionError):
_query_cookies_db(db, ".x.com", ["auth_token", "ct0"])
def test_firefox_database_discovery_preserves_stat_permission_denial(tmp_path):
db = tmp_path / "cookies.sqlite"
real_stat = Path.stat
real_is_file = Path.is_file
def guarded_stat(path, *args, **kwargs):
if path == db:
raise PermissionError(1, "Operation not permitted", str(path))
return real_stat(path, *args, **kwargs)
def simulated_py314_is_file(path, *args, **kwargs):
if path == db:
return False
return real_is_file(path, *args, **kwargs)
with patch.object(Path, "stat", guarded_stat), patch.object(
Path, "is_file", simulated_py314_is_file
):
with pytest.raises(PermissionError):
_query_cookies_db(db, ".x.com", ["auth_token", "ct0"])
def test_wsl_firefox_directory_skips_denied_user_for_accessible_user(tmp_path):
users = tmp_path / "Users"
denied_user = users / "aaa"
available = users / "bbb" / "AppData" / "Roaming" / "Mozilla" / "Firefox"
denied_user.mkdir(parents=True)
available.mkdir(parents=True)
real_stat = Path.stat
real_is_dir = Path.is_dir
def guarded_stat(path, *args, **kwargs):
if path == denied_user:
raise PermissionError(1, "Operation not permitted", str(path))
return real_stat(path, *args, **kwargs)
def simulated_py314_is_dir(path, *args, **kwargs):
if path == denied_user:
return False
return real_is_dir(path, *args, **kwargs)
with patch("lib.cookie_extract.Path", return_value=users), patch.object(
Path, "stat", guarded_stat
), patch.object(Path, "is_dir", simulated_py314_is_dir):
found = cookie_extract._get_wsl_firefox_profiles_dir()
assert found == available
def test_linux_firefox_directory_tries_xdg_after_default_denial(tmp_path, monkeypatch):
blocked = tmp_path / ".mozilla" / "firefox"
available = tmp_path / "xdg" / "mozilla" / "firefox"
available.mkdir(parents=True)
monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path / "xdg"))
real_stat = Path.stat
real_is_dir = Path.is_dir
def guarded_stat(path, *args, **kwargs):
if path == blocked:
raise PermissionError(1, "Operation not permitted", str(path))
return real_stat(path, *args, **kwargs)
def simulated_py314_is_dir(path, *args, **kwargs):
if path == blocked:
return False
return real_is_dir(path, *args, **kwargs)
with patch("lib.cookie_extract.Path.home", return_value=tmp_path), patch(
"lib.cookie_extract.platform.system", return_value="Linux"
), patch.object(Path, "stat", guarded_stat), patch.object(
Path, "is_dir", simulated_py314_is_dir
):
found = _get_firefox_profiles_dir()
assert found == available
@pytest.fixture
def mock_firefox_env(tmp_path):
"""Create a mock Firefox profiles directory with cookies.sqlite.
Returns (profiles_dir, profile_dir) for patching.
"""
def _make(
*,
profiles_ini=None, # type: Optional[str]
profiles=None, # type: Optional[Dict[str, List[Tuple[str, str, str]]]]
default_profile="abc123.default-release", # type: str
):
profiles_dir = tmp_path / "Firefox"
profiles_dir.mkdir(parents=True, exist_ok=True)
# Default: one profile with X cookies
if profiles is None:
profiles = {
default_profile: [
(".x.com", "auth_token", "tok_abc123"),
(".x.com", "ct0", "ct0_xyz789"),
(".x.com", "session", "sess_unrequested"),
(".example.com", "auth_token", "foreign_auth_token"),
(".example.com", "ct0", "foreign_ct0"),
(".example.com", "session", "sess_other"),
],
}
# Create profile directories with cookies databases
for profile_name, cookies in profiles.items():
profile_dir = profiles_dir / profile_name
profile_dir.mkdir(parents=True, exist_ok=True)
db_path = profile_dir / "cookies.sqlite"
conn = sqlite3.connect(str(db_path))
conn.execute(
"CREATE TABLE moz_cookies ("
" id INTEGER PRIMARY KEY,"
" name TEXT NOT NULL,"
" value TEXT NOT NULL,"
" host TEXT NOT NULL,"
" path TEXT DEFAULT '/',"
" expiry INTEGER DEFAULT 0,"
" isSecure INTEGER DEFAULT 1,"
" isHttpOnly INTEGER DEFAULT 1,"
" sameSite INTEGER DEFAULT 0,"
" schemeMap INTEGER DEFAULT 0"
")"
)
for host, name, value in cookies:
conn.execute(
"INSERT INTO moz_cookies (name, value, host) VALUES (?, ?, ?)",
(name, value, host),
)
conn.commit()
conn.close()
# Write profiles.ini
if profiles_ini is None:
profiles_ini = textwrap.dedent(f"""\
[General]
StartWithLastProfile=1
[Profile0]
Name=default-release
IsRelative=1
Path={default_profile}
Default=1
""")
(profiles_dir / "profiles.ini").write_text(profiles_ini)
return profiles_dir
return _make
class TestExtractFirefoxCookies:
"""Tests for extract_firefox_cookies."""
def test_partial_cookie_survives_later_profile_denial(self, mock_firefox_env, capsys):
profiles_dir = mock_firefox_env(
profiles={
"abc123.default-release": [(".x.com", "ct0", "dummy-ct0")],
"xyz789.other": [],
}
)
blocked = profiles_dir / "xyz789.other" / "cookies.sqlite"
real_copyfile = cookie_extract.copy_snapshot
requested = []
def guarded_copyfile(source, target):
if Path(source) == blocked:
raise PermissionError(1, "Operation not permitted", str(blocked))
return real_copyfile(source, target)
def extract_requested(_browser, domain, cookie_names):
if domain == ".x.com":
requested.append(cookie_names)
return cookie_extract._try_firefox_dir(profiles_dir, domain, cookie_names)
with patch("lib.cookie_extract.copy_snapshot", side_effect=guarded_copyfile), patch(
"lib.cookie_extract.extract_cookies",
side_effect=extract_requested,
):
found = env.extract_browser_credentials({
"FROM_BROWSER": "firefox", "BROWSER_CONSENT": "true",
"AUTH_TOKEN": "dummy-auth",
})
assert found == {"CT0": "dummy-ct0"}
assert requested == [["auth_token", "ct0"], ["ct0"]]
assert "permission denied" in capsys.readouterr().err.lower()
def test_manual_token_keeps_complete_profile_preference_without_denial(self, mock_firefox_env):
profiles_dir = mock_firefox_env(
profiles={
"abc123.default-release": [(".x.com", "ct0", "stale-ct0")],
"xyz789.other": [
(".x.com", "auth_token", "dummy-auth"),
(".x.com", "ct0", "matching-ct0"),
],
}
)
requested = []
def extract_requested(_browser, domain, cookie_names):
if domain == ".x.com":
requested.append(cookie_names)
return cookie_extract._try_firefox_dir(profiles_dir, domain, cookie_names)
with patch("lib.cookie_extract.extract_cookies", side_effect=extract_requested):
found = env.extract_browser_credentials({
"FROM_BROWSER": "firefox", "BROWSER_CONSENT": "true",
"AUTH_TOKEN": "dummy-auth",
})
assert found == {"CT0": "matching-ct0"}
assert requested == [["auth_token", "ct0"]]
def test_later_install_entry_outside_profiles_survives_first_denial(self, tmp_path):
profiles_dir = tmp_path / "Firefox"
profiles_dir.mkdir()
blocked = tmp_path / "blocked"
available = tmp_path / "external-profile"
available.mkdir()
(profiles_dir / "profiles.ini").write_text(
f"[InstallA]\nDefault={blocked}\n[InstallB]\nDefault={available}\n"
)
real_stat = Path.stat
def guarded_stat(path, *args, **kwargs):
if path == blocked:
raise PermissionError(1, "Operation not permitted", str(path))
return real_stat(path, *args, **kwargs)
with patch.object(Path, "stat", guarded_stat):
assert _find_default_profile(profiles_dir) == available
def test_denied_default_copy_uses_complete_pair_in_alternate_profile(self, mock_firefox_env):
profiles_dir = mock_firefox_env(
profiles={
"abc123.default-release": [],
"xyz789.other": [
(".x.com", "auth_token", "dummy-auth"),
(".x.com", "ct0", "dummy-ct0"),
],
}
)
blocked = profiles_dir / "abc123.default-release" / "cookies.sqlite"
real_copyfile = cookie_extract.copy_snapshot
def guarded_copyfile(source, target):
if Path(source) == blocked:
raise PermissionError(1, "Operation not permitted", str(blocked))
return real_copyfile(source, target)
with patch("lib.cookie_extract.copy_snapshot", side_effect=guarded_copyfile):
found = cookie_extract._try_firefox_dir(
profiles_dir, ".x.com", ["auth_token", "ct0"]
)
assert found == {"auth_token": "dummy-auth", "ct0": "dummy-ct0"}
@pytest.mark.skipif(os.name == "nt", reason="POSIX permission bits are not reliable on Windows")
def test_temp_cookie_db_copy_is_owner_only(self, tmp_path):
"""Copied cookie DB temp files are chmodded owner-only before read."""
db_path = tmp_path / "cookies.sqlite"
conn = sqlite3.connect(str(db_path))
conn.execute(
"CREATE TABLE moz_cookies (name TEXT NOT NULL, value TEXT NOT NULL, host TEXT NOT NULL)"
)
conn.execute(
"INSERT INTO moz_cookies (name, value, host) VALUES (?, ?, ?)",
("auth_token", "tok_abc123", ".x.com"),
)
conn.commit()
conn.close()
os.chmod(db_path, 0o644)
real_connect = sqlite3.connect
def assert_temp_copy_locked(path, *args, **kwargs):
if kwargs.get("uri"):
assert path == db_path.resolve().as_uri() + "?mode=ro"
elif Path(str(path)) != db_path:
assert Path(str(path)).stat().st_mode & 0o777 == 0o600
return real_connect(path, *args, **kwargs)
with patch("lib.cookie_extract.sqlite3.connect", side_effect=assert_temp_copy_locked):
result = _query_cookies_db(db_path, ".x.com", ["auth_token"])
assert result == {"auth_token": "tok_abc123"}
@pytest.mark.skipif(os.name == "nt", reason="POSIX permission model does not apply on Windows; mkstemp is 0o666 there")
def test_temp_cookie_copy_never_world_readable(self, tmp_path):
"""The temp copy must be private the instant it exists, not only after
the lock chmod. Regression for the TOCTOU window where copy2 widened the
0600 mkstemp file to the source's 0644 before _lock_temp_cookie_copy ran.
"""
db_path = tmp_path / "cookies.sqlite"
conn = sqlite3.connect(str(db_path))
conn.execute(
"CREATE TABLE moz_cookies (name TEXT NOT NULL, value TEXT NOT NULL, host TEXT NOT NULL)"
)
conn.execute(
"INSERT INTO moz_cookies (name, value, host) VALUES (?, ?, ?)",
("auth_token", "tok_abc123", ".x.com"),
)
conn.commit()
conn.close()
os.chmod(db_path, 0o644) # loose source perms, as Firefox ships them
observed = {}
real_lock = cookie_extract._lock_temp_cookie_copy
def spy(path):
# Mode of the copy as it exists right after copyfile, before chmod.
observed["mode_after_copy"] = os.stat(path).st_mode & 0o777
return real_lock(path)
with patch.object(cookie_extract, "_lock_temp_cookie_copy", side_effect=spy):
_query_cookies_db(db_path, ".x.com", ["auth_token"])
assert observed["mode_after_copy"] == 0o600
def test_valid_cookies_extracted(self, mock_firefox_env):
"""Cookies for the target domain are returned correctly."""
profiles_dir = mock_firefox_env()
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result == {"auth_token": "tok_abc123", "ct0": "ct0_xyz789"}
def test_multiple_profiles_selects_default(self, mock_firefox_env):
"""When multiple profiles exist, the one with Default=1 is used."""
profiles_dir = mock_firefox_env(
profiles={
"aaa111.other": [
(".x.com", "auth_token", "wrong_token"),
],
"bbb222.default-release": [
(".x.com", "auth_token", "correct_token"),
(".x.com", "ct0", "correct_ct0"),
],
},
profiles_ini=textwrap.dedent("""\
[General]
StartWithLastProfile=1
[Profile0]
Name=other
IsRelative=1
Path=aaa111.other
[Profile1]
Name=default-release
IsRelative=1
Path=bbb222.default-release
Default=1
"""),
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is not None
assert result["auth_token"] == "correct_token"
assert result["ct0"] == "correct_ct0"
def test_firefox_not_installed(self):
"""Returns None when Firefox profiles directory doesn't exist."""
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=None,
), patch(
"lib.cookie_extract._is_wsl",
return_value=False,
):
result = extract_firefox_cookies(".x.com", ["auth_token"])
assert result is None
def test_default_partial_yields_to_complete_non_default(self, mock_firefox_env):
"""Default profile holds a lone ct0 (logged-out); the logged-in
non-default profile's complete pair wins."""
profiles_dir = mock_firefox_env(
profiles={
"aaa111.default": [
(".x.com", "ct0", "partial_ct0"),
],
"bbb222.release": [
(".x.com", "auth_token", "tok_complete"),
(".x.com", "ct0", "ct0_complete"),
],
},
profiles_ini=textwrap.dedent("""\
[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=aaa111.default
Default=1
[Profile1]
Name=release
IsRelative=1
Path=bbb222.release
"""),
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is not None
assert result["auth_token"] == "tok_complete"
assert result["ct0"] == "ct0_complete"
def test_partial_fallback_when_no_complete_profile(self, mock_firefox_env):
"""With no complete profile anywhere, the first partial is kept."""
profiles_dir = mock_firefox_env(
profiles={
"aaa111.default": [
(".x.com", "ct0", "partial_ct0"),
],
},
profiles_ini=textwrap.dedent("""\
[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=aaa111.default
Default=1
"""),
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result == {"ct0": "partial_ct0"}
def test_cookies_sqlite_empty(self, mock_firefox_env):
"""Returns None when cookies.sqlite has no rows."""
profiles_dir = mock_firefox_env(
profiles={"abc123.default-release": []}, # no cookies
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
), patch(
"lib.cookie_extract._is_wsl",
return_value=False,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is None
def test_domain_has_no_cookies(self, mock_firefox_env):
"""Returns None when cookies exist but not for the target domain."""
profiles_dir = mock_firefox_env(
profiles={
"abc123.default-release": [
(".example.com", "auth_token", "foreign_auth_token"),
(".example.com", "ct0", "foreign_ct0"),
(".example.com", "session", "sess_123"),
],
},
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
), patch(
"lib.cookie_extract._is_wsl",
return_value=False,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is None
def test_malformed_profiles_ini_falls_back(self, mock_firefox_env):
"""Falls back to first profile on disk when profiles.ini is garbage."""
profiles_dir = mock_firefox_env(
profiles={
"zzz999.fallback": [
(".x.com", "auth_token", "fallback_token"),
],
},
profiles_ini="this is not valid ini content\n[[[broken",
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token"])
assert result is not None
assert result["auth_token"] == "fallback_token"
def test_utf16_profiles_ini_uses_install_default(self, mock_firefox_env):
"""Firefox on Windows writes UTF-16 LE profiles.ini (#1067)."""
default_profile = "en3ndvop.default-release"
decoy = "aaa111.decoy"
profiles_dir = mock_firefox_env(
default_profile=default_profile,
profiles={
decoy: [
(".x.com", "auth_token", "decoy_token"),
],
default_profile: [
(".x.com", "auth_token", "utf16_token"),
(".x.com", "ct0", "utf16_ct0"),
],
},
)
ini = textwrap.dedent(f"""\
[Install308046B0AF4A39CB]
Default={default_profile}
Locked=1
""")
(profiles_dir / "profiles.ini").write_bytes(ini.encode("utf-16"))
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is not None
assert result["auth_token"] == "utf16_token"
assert result["ct0"] == "utf16_ct0"
def test_non_default_profile_with_cookies(self, mock_firefox_env):
"""Falls back to non-default profile when default has no X cookies."""
profiles_dir = mock_firefox_env(
profiles={
"aaa111.default": [
(".example.com", "session", "sess_other"),
],
"bbb222.release": [
(".x.com", "auth_token", "tok_nondefault"),
(".x.com", "ct0", "ct0_nondefault"),
],
},
profiles_ini=textwrap.dedent("""\
[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=aaa111.default
Default=1
[Profile1]
Name=release
IsRelative=1
Path=bbb222.release
"""),
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is not None
assert result["auth_token"] == "tok_nondefault"
assert result["ct0"] == "ct0_nondefault"
def test_multiple_profiles_none_have_cookies(self, mock_firefox_env):
"""Returns None when no profile has matching cookies."""
profiles_dir = mock_firefox_env(
profiles={
"aaa111.default": [
(".example.com", "session", "sess_a"),
],
"bbb222.release": [
(".other.com", "other", "val_b"),
],
},
profiles_ini=textwrap.dedent("""\
[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=aaa111.default
Default=1
[Profile1]
Name=release
IsRelative=1
Path=bbb222.release
"""),
)
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
), patch(
"lib.cookie_extract._is_wsl",
return_value=False,
):
result = extract_firefox_cookies(".x.com", ["auth_token", "ct0"])
assert result is None
class TestExtractCookiesAuto:
"""Tests for extract_cookies with browser='auto'."""
def test_auto_macos_tries_chrome_then_firefox(self, mock_firefox_env):
"""On macOS, auto tries the Chromium family first, falls back to Firefox."""
profiles_dir = mock_firefox_env()
# Mock every Chromium-family extractor to None so the test is hermetic
# regardless of which browsers are actually installed/logged-in on the
# machine running it (auto tries these before Firefox).
with (
patch("lib.cookie_extract.platform.system", return_value="Darwin"),
patch("lib.cookie_extract.extract_chrome_cookies", return_value=None),
patch("lib.cookie_extract.extract_brave_cookies", return_value=None),
patch("lib.cookie_extract.extract_edge_cookies", return_value=None),
patch("lib.cookie_extract.extract_vivaldi_cookies", return_value=None),
patch("lib.cookie_extract.extract_opera_cookies", return_value=None),
patch("lib.cookie_extract.extract_arc_cookies", return_value=None),
patch("lib.cookie_extract.extract_chromium_cookies", return_value=None),
patch("lib.cookie_extract.extract_safari_cookies", return_value=None),
patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
),
):
result = extract_cookies("auto", ".x.com", ["auth_token", "ct0"])
# All Chromium browsers and Safari return None, Firefox succeeds
assert result is not None
assert result["auth_token"] == "tok_abc123"
assert result["ct0"] == "ct0_xyz789"
def test_auto_linux_tries_firefox_only(self, mock_firefox_env):
"""On Linux, auto only tries Firefox."""
profiles_dir = mock_firefox_env()
with (
patch("lib.cookie_extract.platform.system", return_value="Linux"),
patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
),
):
result = extract_cookies("auto", ".x.com", ["auth_token", "ct0"])
assert result is not None
assert result["auth_token"] == "tok_abc123"
def test_explicit_firefox(self, mock_firefox_env):
"""Explicit browser='firefox' goes directly to Firefox."""
profiles_dir = mock_firefox_env()
with patch(
"lib.cookie_extract._get_firefox_profiles_dir",
return_value=profiles_dir,
):
result = extract_cookies("firefox", ".x.com", ["auth_token"])
assert result is not None
assert result["auth_token"] == "tok_abc123"
def test_unknown_browser_returns_none(self):
"""Unknown browser name returns None."""
result = extract_cookies("netscape", ".x.com", ["auth_token"])
assert result is None
def test_chrome_delegates_to_chrome_module(self):
"""Chrome extraction delegates to chrome_cookies module."""
with patch(
"lib.cookie_extract.extract_chrome_cookies",
return_value={"auth_token": "chrome_tok"},
):
result = extract_cookies("chrome", ".x.com", ["auth_token"])
assert result == {"auth_token": "chrome_tok"}
def test_safari_delegates_to_safari_module(self):
"""Safari extraction delegates to safari_cookies module."""
with patch(
"lib.cookie_extract.extract_safari_cookies",
return_value={"auth_token": "safari_tok"},
):
result = extract_cookies("safari", ".x.com", ["auth_token"])
assert result == {"auth_token": "safari_tok"}
class TestHasCompletePair:
"""Tests for the shared has_complete_pair() helper."""
def test_none_is_incomplete(self):
assert has_complete_pair(None, ["auth_token", "ct0"]) is False
def test_empty_is_incomplete(self):
assert has_complete_pair({}, ["auth_token", "ct0"]) is False
def test_partial_pair_is_incomplete(self):
assert has_complete_pair({"ct0": "x"}, ["auth_token", "ct0"]) is False
def test_empty_valued_pair_is_incomplete(self):
assert has_complete_pair({"auth_token": "", "ct0": ""}, ["auth_token", "ct0"]) is False
assert has_complete_pair({"auth_token": "a", "ct0": ""}, ["auth_token", "ct0"]) is False
def test_complete_pair(self):
assert has_complete_pair(
{"auth_token": "a", "ct0": "c"}, ["auth_token", "ct0"]
) is True
def test_single_cookie_service(self):
assert has_complete_pair({"_session_id": "s"}, ["_session_id"]) is True
def test_extra_keys_still_complete(self):
assert has_complete_pair(
{"auth_token": "a", "ct0": "c", "other": "o"},
["auth_token", "ct0"],
) is True