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