aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 9f07c706..d65fa5b4 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -214,7 +214,18 @@ class u_parse_size(libpry.AutoTree):
libpry.raises(ValueError, utils.parse_size, "ak")
+class u_parse_content_type(libpry.AutoTree):
+ def test_simple(self):
+ p = utils.parse_content_type
+ assert p("text/html") == ("text", "html", {})
+ assert p("text") == None
+
+ v = p("text/html; charset=UTF-8")
+ assert v == ('text', 'html', {'charset': 'UTF-8'})
+
+
tests = [
+ u_parse_content_type(),
uformat_timestamp(),
uisBin(),
uisXML(),