Example #1
0
def test_email_property():

    prop = EmailProperty()
    prop.name = 'email'
    prop.owner = object()
    result = prop.inflate('*****@*****.**')
    assert result == '*****@*****.**'

    with raises(DeflateError):
        prop.deflate('foo@example')
Example #2
0
def test_email_property():

    prop = EmailProperty()
    prop.name = 'email'
    prop.owner = object()
    result = prop.inflate('*****@*****.**')
    assert result == '*****@*****.**'

    with raises(DeflateError):
        prop.deflate('foo@example')
Example #3
0
def test_email_property():

    prop = EmailProperty()
    prop.name = "email"
    prop.owner = object()
    result = prop.inflate("*****@*****.**")
    assert result == "*****@*****.**"

    with raises(DeflateError):
        prop.deflate("foo@example")
Example #4
0
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
Example #5
0
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