test: delete slow, timing-based and redundant tests

This commit is contained in:
imSp4rky
2026-12-05 15:20:05 -07:00
parent 783a2fc185
commit 3a0a74e694
292 changed files with 153 additions and 15174 deletions
-35
View File
@@ -14,13 +14,6 @@ def _names(jar) -> dict:
return {c.name: c.value for c in jar}
def test_space_separated_cookie_file(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text(HEADER + ".example.com TRUE / TRUE 1234567890 sid abc123\n", "utf8")
assert _names(login.load_cookie_file(file)) == {"sid": "abc123"}
def test_tab_separated_value_keeps_spaces(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text(
@@ -30,20 +23,6 @@ def test_tab_separated_value_keeps_spaces(tmp_path: Path) -> None:
assert _names(login.load_cookie_file(file)) == {"sid": "a b c"}
def test_space_separated_empty_value(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text(HEADER + ".example.com TRUE / TRUE 1234567890 sid \n", "utf8")
assert _names(login.load_cookie_file(file)) == {"sid": ""}
def test_space_separated_httponly(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text(HEADER + "#HttpOnly_.example.com TRUE / TRUE 1234567890 sid abc123\n", "utf8")
assert _names(login.load_cookie_file(file)) == {"sid": "abc123"}
def test_mixed_separators_in_one_file(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text(
@@ -86,20 +65,6 @@ def test_json_export_gives_clear_error(tmp_path: Path) -> None:
login.load_cookie_file(file)
def test_leading_blank_line_is_not_json(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text("\n" + HEADER + ".example.com TRUE / TRUE 1234567890 sid abc123\n", "utf8")
assert _names(login.load_cookie_file(file)) == {"sid": "abc123"}
def test_dot_flag_mismatch_does_not_abort_file(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
file.write_text(HEADER + "example.com\tTRUE\t/\tTRUE\t1\tsid\tv\n", "utf8")
assert _names(login.load_cookie_file(file)) == {"sid": "v"}
def test_the_users_file_is_never_rewritten(tmp_path: Path) -> None:
file = tmp_path / "cookies.txt"
original = ".example.com TRUE / TRUE 1234567890 sid abc123\n"