def test_returns_boolean_True_or_False(self): self.assertTrue(isinstance(Validations.is_email('*****@*****.**'), bool)) self.assertTrue(isinstance(Validations.is_email('invalid@email'), bool))
def test_allows_validation_for_emails(self): self.assertTrue(Validations.is_email('*****@*****.**')) self.assertTrue(Validations.is_email('*****@*****.**')) self.assertFalse(Validations.is_email('invalid@email')) self.assertFalse(Validations.is_email('[email protected] '))