def test_email_property(): prop = EmailProperty() prop.name = 'email' prop.owner = object() result = prop.inflate('*****@*****.**') assert result == '*****@*****.**' with raises(DeflateError): prop.deflate('foo@example')
def test_email_property(): prop = EmailProperty() prop.name = "email" prop.owner = object() result = prop.inflate("*****@*****.**") assert result == "*****@*****.**" with raises(DeflateError): prop.deflate("foo@example")
def test_email_property(): prop = EmailProperty() prop.name = 'email' prop.owner = object() result = prop.inflate('*****@*****.**') assert result == '*****@*****.**' try: prop.deflate('foo@example') except DeflateError: assert True else: assert False