def assert_see_other__keep_query_string(self) -> None: response = FakeResponse( "303 See Other", [("Location", "http://example.com/foo?abc=def#frag")], ) with assert_succeeds(AssertionError): response.assert_see_other("/foo?abc=def#frag")
def assert_see_other__relative_location(self) -> None: response = FakeResponse( "303 See Other", [("Location", "http://example.com/foo/bar")] ) with assert_succeeds(AssertionError): response.assert_see_other("/foo/bar")
def assert_see_other__no_location_header(self) -> None: response = FakeResponse("303 See Other", []) with assert_raises(AssertionError): response.assert_see_other("http://example.org/")
def assert_see_other__wrong_location(self) -> None: response = FakeResponse( "303 See Other", [("Location", "http://example.com/")] ) with assert_raises(AssertionError): response.assert_see_other("http://example.org/")
def assert_see_other__wrong_status(self) -> None: response = FakeResponse( "200 OK", [("Location", "http://example.com/")] ) with assert_raises(AssertionError): response.assert_see_other("http://example.com/")