summaryrefslogtreecommitdiff
path: root/tests/test_acceptparse.py
diff options
context:
space:
mode:
authorLucas Taylor <ltaylor.volks@gmail.com>2015-03-23 14:53:32 -0700
committerLucas Taylor <ltaylor.volks@gmail.com>2015-03-23 14:53:32 -0700
commite51a6089410dfc853d59396d335419ab17b3efe3 (patch)
treeb76382a338572645391ef3e1383e2bebd1244881 /tests/test_acceptparse.py
parentb8c307fc8e1a7cf231636ea4feb984c0745a210d (diff)
downloadwebob-e51a6089410dfc853d59396d335419ab17b3efe3.tar.gz
Improved test coverage for MIMEAccept wildcard matching
Diffstat (limited to 'tests/test_acceptparse.py')
-rw-r--r--tests/test_acceptparse.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_acceptparse.py b/tests/test_acceptparse.py
index 3ffdeae..a5e8c15 100644
--- a/tests/test_acceptparse.py
+++ b/tests/test_acceptparse.py
@@ -314,7 +314,10 @@ def test_wildcard_matching():
('*/a', '*')]
for mask, offer in matches:
assert mimeaccept._match(mask, offer)
-
+ # Test malformed mask and offer variants where either is missing
+ # a type or subtype
+ assert mimeaccept._match('A', offer)
+ assert mimeaccept._match(mask, 'a')
mismatches = [
('B/b', 'A/*'),