def test_resolve_uri_dir(uri, body): """Test resolve uri function for a directory.""" assert body in resolve_uri(uri)[0]
def test_resolve_uri_error(uri): """Test resolve uri function for bad uri.""" with pytest.raises(IOError): resolve_uri(uri)
def test_resolve_uri_py(uri, body, content_length, file_type): """Test resolve uri function for a py file.""" assert resolve_uri(uri) == (body, content_length, file_type)