def test___unicode___method(self): try: image = Image(name="test", image="image.jpg", caption="caption") image.save() self.assertEqual("test", image.__unicode__()) except AttributeError: self.fail("No __unicode__ method found")
def test_filename_method(self): try: Image.filename(Image(image="cat.jpg")) except AttributeError: self.fail("No __unicode__ method found")