Esempio n. 1
0
 def check(mime, expected):
     result = http.mime2tuple(mime)
     self.assertEqual(result, expected)
Esempio n. 2
0
 def enable_mime_type(self, mime_type, priority=0.5):
     type, sub = http.mime2tuple(mime_type)
     self._mime_types.setdefault(type, {})[sub] = min(1.0, float(priority))