def test_resolve_uri_failure(): with pytest.raises(IOError): gevent_server.resolve_uri(b"laskjdhfku")
def test_resolve_uri_success(): body, content_type = gevent_server.resolve_uri(b"/sample.txt") assert b"simple text file" in body assert b"text" in content_type