summaryrefslogtreecommitdiff
path: root/testdata.json
diff options
context:
space:
mode:
authorStefan Wojcik <wojcikstefan@gmail.com>2016-01-26 20:40:47 -0800
committerStefan Wojcik <wojcikstefan@gmail.com>2016-01-26 20:40:47 -0800
commitf59ab82ee0348f51ddb99a5d104902ea50eb02cc (patch)
treed824d74ecac73a6f54e3de600efaa5085eca15d2 /testdata.json
parent2ae1bbeaeb8827e9debfbb3254c732ee0ccff1c3 (diff)
downloadpython-mimeparse-f59ab82ee0348f51ddb99a5d104902ea50eb02cc.tar.gz
raise an exception when the header cannot be parsed + better handling of unit tests
Diffstat (limited to 'testdata.json')
-rw-r--r--testdata.json6
1 files changed, 4 insertions, 2 deletions
diff --git a/testdata.json b/testdata.json
index 7a84b39..c23f668 100644
--- a/testdata.json
+++ b/testdata.json
@@ -34,11 +34,13 @@
[[["image/*", "application/xml"], "image/*"], "image/*", "match using a wildcard for both requested and supported"],
[[["image/jpeg", "text/plain"], "text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5"], "image/jpeg", "media type with highest associated quality factor should win, not necessarily most specific"],
[[["text/html", "application/rdf+xml"], "text/html, application/rdf+xml"], "application/rdf+xml", "match should use highest order of supported when there is a tie"],
- [[["application/rdf+xml", "text/html"], "text/html, application/rdf+xml"], "text/html", "match should use highest order of supported when there is a tie"]
+ [[["application/rdf+xml", "text/html"], "text/html, application/rdf+xml"], "text/html", "match should use highest order of supported when there is a tie"],
+ [[["application/json", "text/html"], "text"], null, "match should use the default if an invalid Accept header is passed"]
],
"parse_mime_type": [
["application/xhtml;q=0.5", ["application", "xhtml", {"q": "0.5"}]],
- ["application/xhtml;q=0.5;ver=1.2", ["application", "xhtml", {"q": "0.5", "ver": "1.2"}]]
+ ["application/xhtml;q=0.5;ver=1.2", ["application", "xhtml", {"q": "0.5", "ver": "1.2"}]],
+ ["text", null]
]
}