def test___image_ext_content_type_known_type(self):
     """_Image.__image_ext_content_type() correct for known content type"""
     # exercise ---------------------
     content_type = _Image._Image__image_ext_content_type('.jpeg')
     # verify -----------------------
     expected = 'image/jpeg'
     actual = content_type
     msg = ("expected content type '%s', got '%s'" % (expected, actual))
     self.assertEqual(expected, actual, msg)
 def test___image_ext_content_type_raises_on_non_img_ext(self):
     """_Image.__image_ext_content_type() raises on non-image extension"""
     # verify -----------------------
     with self.assertRaises(TypeError):
         _Image._Image__image_ext_content_type('.xml')
 def test___image_ext_content_type_raises_on_bad_ext(self):
     """_Image.__image_ext_content_type() raises on bad extension"""
     # verify -----------------------
     with self.assertRaises(TypeError):
         _Image._Image__image_ext_content_type('.xj7')