コード例 #1
0
def test_resolve_uri_dir(uri, body):
    """Test resolve uri function for a directory."""
    assert body in resolve_uri(uri)[0]
コード例 #2
0
def test_resolve_uri_error(uri):
    """Test resolve uri function for bad uri."""
    with pytest.raises(IOError):
        resolve_uri(uri)
コード例 #3
0
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)