← Về thư mục
tests/test_auth_exit_matrix.py
- _Hub · class · L44-L75 — class _Hub
- init · method · L52-L53 — def init(self) -> None
- add · method · L55-L56 — def add(self, conn)
- remove · method · L58-L60 — def remove(self, conn)
- subscribe · method · L62-L63 — def subscribe(self, conn, root_frame_id)
- emitter · method · L65-L66 — def emitter(self, root_frame_id)
- broadcast · method · L68-L69 — def broadcast(self, root_frame_id, event)
- has_subscriber · method · L71-L72 — def has_subscriber(self, root_frame_id)
- drop_frame · method · L74-L75 — def drop_frame(self, root_frame_id)
- _free_port · function · L78-L88 — def _free_port() -> int: # The Host allowlist compares against
cfg.port, so the daemon has to be # listening on the port its config names; an ephemeral bind would make every # request fail the Host check and the whole module would pass for the wrong # reason.
- _config · function · L91-L100 — def _config(data_dir: Path, port: int) -> Config
- _Daemon · class · L103-L160 — class _Daemon
- init · method · L110-L117 — def init(self, data_dir: Path) -> None
- start · method · L119-L135 — def start(self) -> None
- restart · method · L137-L139 — def restart(self) -> None
- stop_server · method · L141-L148 — def stop_server(self) -> None
- close · method · L150-L156 — def close(self) -> None
- token · method · L159-L160 — def token(self) -> str
- daemon · function · L164-L169 — def daemon(tmp_path: Path)
- _speak · function · L172-L201 — def _speak(port: int, request: bytes, *, read_all: bool = True) -> tuple[int, bytes]
- _ws_upgrade · function · L204-L219 — def _ws_upgrade(port: int, *, token: str | None, cookie: str | None = None) -> tuple
- _get · function · L222-L229 — def _get(port: int, path: str, *, token: str | None = None, cookie: str | None = None)
- test_an_unauthenticated_websocket_upgrade_never_switches_protocols · function · L235-L248 — def test_an_unauthenticated_websocket_upgrade_never_switches_protocols(daemon)
- test_a_wrong_credential_does_not_open_the_socket_either · function · L251-L257 — def test_a_wrong_credential_does_not_open_the_socket_either(daemon)
- test_the_right_credential_does_open_the_socket · function · L260-L267 — def test_the_right_credential_does_open_the_socket(daemon)
- _concrete · function · L273-L283 — def _concrete(route: str) -> str
- test_every_routable_path_refuses_an_anonymous_caller · function · L286-L310 — def test_every_routable_path_refuses_an_anonymous_caller(daemon)
- local_auth_exempt_paths · function · L313-L319 — def local_auth_exempt_paths() -> set[str]
- test_the_exempt_paths_answer_without_a_credential · function · L322-L330 — def test_the_exempt_paths_answer_without_a_credential(daemon)
- test_the_exempt_set_stays_small_and_named · function · L333-L337 — def test_the_exempt_set_stays_small_and_named(daemon)
- _issue_cookie · function · L343-L356 — def _issue_cookie(daemon: _Daemon) -> str
- test_a_cookie_issued_before_a_restart_is_accepted_after_it · function · L359-L375 — def test_a_cookie_issued_before_a_restart_is_accepted_after_it(daemon)
- test_a_cookie_issued_before_a_restart_still_opens_the_websocket · function · L378-L387 — def test_a_cookie_issued_before_a_restart_still_opens_the_websocket(daemon)
- test_a_cookie_from_a_different_data_dir_is_not_accepted · function · L390-L400 — def test_a_cookie_from_a_different_data_dir_is_not_accepted(tmp_path)
- _body · function · L406-L409 — def _body(raw: bytes) -> dict
- test_require_token_zero_is_ignored_on_loopback · function · L413-L451 — def test_require_token_zero_is_ignored_on_loopback( tmp_path, monkeypatch, capsys, value )
- test_require_token_zero_is_ignored_off_loopback · function · L454-L468 — def test_require_token_zero_is_ignored_off_loopback(tmp_path, monkeypatch)
- test_no_browser_gate_still_configures_the_retired_token_switch · function · L471-L484 — def test_no_browser_gate_still_configures_the_retired_token_switch()
- test_no_python_test_arms_the_retired_token_switch · function · L487-L505 — def test_no_python_test_arms_the_retired_token_switch()