Esempio n. 1
0
def test_email():
    assert validate_email('*****@*****.**') == '*****@*****.**'
    with pytest.raises(ValidationError):
        validate_email('example.com')
    with pytest.raises(ValidationError):
        validate_email('127.0.0.1')
Esempio n. 2
0
 def test_email(self):
     assert validate_email('*****@*****.**') == '*****@*****.**'
     with self.assertRaises(ValidationError):
         validate_email('example.com')
     with self.assertRaises(ValidationError):
         validate_email('127.0.0.1')