def assert_created_at__keep_query_string(self) -> None: response = FakeResponse( "201 Created", [("Location", "http://example.com/foo?abc=def#frag")], ) with assert_succeeds(AssertionError): response.assert_created_at("/foo?abc=def#frag")
def assert_created_at__wrong_location(self) -> None: response = FakeResponse( "201 Created", [("Location", "http://example.com/")] ) with assert_raises(AssertionError): response.assert_created_at("http://example.org/")
def assert_created_at__relative_location(self) -> None: response = FakeResponse( "201 Created", [("Location", "http://example.com/foo/bar")] ) with assert_succeeds(AssertionError): response.assert_created_at("/foo/bar")
def assert_created_at__no_location_header(self) -> None: response = FakeResponse("201 Created", []) with assert_raises(AssertionError): response.assert_created_at("http://example.org/")