Skip to content

Commit

Permalink
Simple tests to ensure character encoding works
Browse files Browse the repository at this point in the history
To make sure we don't break this again.
  • Loading branch information
jamielennox committed Apr 29, 2021
1 parent 9dfb42d commit c7e7466
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/test_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ def test_url_matching(self):
'http://www.test.com/abc')
self.assertMatchBoth('http://www.test.com:5000/abc',
'http://www.test.com:5000/abc')
self.assertMatchBoth('http://www.test.com/a string%url',
'http://www.test.com/a string%url')

self.assertNoMatchBoth('https://www.test.com',
'http://www.test.com')
self.assertNoMatchBoth('http://www.test.com/abc',
Expand All @@ -161,6 +158,14 @@ def test_url_matching(self):
self.assertNoMatchBoth('http://test.com/abc/',
'http://www.test.com:5000/abc')

def test_quotation(self):
self.assertMatchBoth('http://www.test.com/a string%url',
'http://www.test.com/a string%url')
self.assertMatchBoth('http://www.test.com/ABC 123',
'http://www.test.com/ABC%20123')
self.assertMatchBoth('http://www.test.com/user@example.com',
'http://www.test.com/user@example.com')

def test_subset_match(self):
self.assertMatch('/path', 'http://www.test.com/path')
self.assertMatch('/path', 'http://www.test.com/path')
Expand Down

0 comments on commit c7e7466

Please sign in to comment.