def test_can_post_simple_text_resource(): resource = Resource("http://localhost:8080/hello") response = resource.post("fred") assert isinstance(response, TextResponse) content = response.read().decode(response.encoding) assert content == "hello, world and fred"