moo.shell.tests.test_terminal_view

Tests for the terminal() POST proxy that injects the site suffix from Host.

Functions

test_terminal_post_does_not_inject_when_host_unknown(client)

A Host header with no matching Site leaves the username unchanged.

test_terminal_post_injects_site_suffix_from_host(client)

Browser hitting zork1.local has its SSH username rewritten to user+zork1.local.

test_terminal_post_preserves_existing_suffix(client)

A user-supplied suffix is not double-encoded.