Exemple #1
0
 def test_mime_lookup_given_correct_value(self):
     value = "application/atom+xml"
     expected_result = ".atom"
     self.assertEqual(mime_lookup(value), expected_result)
Exemple #2
0
 def test_mime_lookup_given_unknown_type(self):
     value = "this_mime_doesn't_exist"
     with self.assertRaises(HeaderError):
         mime_lookup(value)
Exemple #3
0
 def test_mime_lookup_given_blank_value(self):
     value = ""
     expected_result = ".html"
     self.assertEqual(mime_lookup(value), expected_result)