Skip to content

Commit

Permalink
refactor(tests): update URL matcher test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
h2non committed Dec 14, 2016
1 parent 52af23f commit b7d6a91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/matchers/url_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def test_url_matcher_urlparse():
# Valid cases
('http://foo.com', 'http://foo.com', True),
('http://foo.com:80', 'http://foo.com:80', True),
('http://foo.com', 'http://foo.com/foo/bar', True),
('http://foo.com/foo', 'http://foo.com/foo', True),
('http://foo.com/foo/bar', 'http://foo.com/foo/bar', True),
('http://foo.com/foo/bar/baz', 'http://foo.com/foo/bar/baz', True),
Expand All @@ -34,6 +35,7 @@ def test_url_matcher_urlparse():
# Invalid cases
('http://foo.com', 'http://bar.com', False),
('http://foo.com:80', 'http://foo.com:443', False),
('http://foo.com/foo', 'http://foo.com', False),
('http://foo.com/foo', 'http://foo.com/bar', False),
('http://foo.com/foo/bar', 'http://foo.com/bar/foo', False),
('http://foo.com/foo/bar/baz', 'http://foo.com/baz/bar/foo', False),
Expand All @@ -46,6 +48,7 @@ def test_url_matcher_regex():
# Valid cases
('http://foo.com', 'http://foo.com', True),
('http://foo.com:80', 'http://foo.com:80', True),
('^http://foo.com', 'http://foo.com/foo/bar', True),
('http://foo.com/foo', 'http://foo.com/foo', True),
('http://foo.com/foo/bar', 'http://foo.com/foo/bar', True),
('http://foo.com/foo/bar/baz', 'http://foo.com/foo/bar/baz', True),
Expand All @@ -54,6 +57,7 @@ def test_url_matcher_regex():
# Invalid cases
('http://foo.com', 'http://bar.com', False),
('http://foo.com:80', 'http://foo.com:443', False),
('^http://foo.com$', 'http://foo.com/bar', False),
('http://foo.com/foo', 'http://foo.com/bar', False),
('http://foo.com/foo/bar', 'http://foo.com/bar/foo', False),
('http://foo.com/foo/bar/baz', 'http://foo.com/baz/bar/foo', False),
Expand Down

0 comments on commit b7d6a91

Please sign in to comment.