def test_returns_different_images_with_different_emails(self): url1 = utils.get_nopic_avatar('*****@*****.**') url2 = utils.get_nopic_avatar('*****@*****.**') url3 = utils.get_nopic_avatar('*****@*****.**') self.assertNotEqual(url1, url2) self.assertNotEqual(url1, url3) self.assertNotEqual(url2, url3) for url in [url1, url2, url3]: self.assertIsImage(url)
def test_returns_image_with_undefined(self): self.assertIsImage(utils.get_nopic_avatar(Undefined()))