Skip to content

Commit

Permalink
Validate from_wsgi factory; fixes #13.
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Mar 11, 2021
1 parent bb97aba commit b3d4ddc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/test_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ def empty():
return URI('http://example.com/over/there')


def test_wsgi_unpacking():
webob = pytest.importorskip('webob')

url = 'https://example.com/foo/bar?baz=27'

request = webob.Request.blank(url)
uri = URI.from_wsgi(request)

assert str(uri) == url


@pytest.mark.parametrize('string,attributes', URI_COMPONENTS)
class TestURI(object):
def test_truthiness(self, string, attributes):
Expand Down

0 comments on commit b3d4ddc

Please sign in to comment.