예제 #1
0
def test_anon():
    addressing.store(user_real, user_id)

    user_anon = addressing.anon(user_real, host)
    assert_equal(user_anon, user_id + '@' + host)

    addressing.delete(user_real)
예제 #2
0
def test_store_lookup_delete_with_dumb_addresses():
    addressing.store('"Zed Shaw" <*****@*****.**>', "fake")
    assert_equal("fake", addressing.lookup("*****@*****.**"))
    assert_equal("fake", addressing.lookup('"Zed Shaw" <*****@*****.**>'))
    addressing.delete("*****@*****.**")
    assert_raises(KeyError, addressing.lookup, "*****@*****.**")
    assert_raises(KeyError, addressing.lookup,'"Zed Shaw" <*****@*****.**>')
예제 #3
0
def test_store_lookup_delete():
    addressing.store(user_id, user_real)
    addr = addressing.lookup(user_id)
    assert_equal(addr, user_real)
   
    addressing.delete(user_id)
    assert_raises(KeyError, addressing.lookup, user_id)
예제 #4
0
def test_anon():
    addressing.store(user_real, user_id)

    user_anon = addressing.anon(user_real, host)
    assert_equal(user_anon, user_id + '@' + host)

    addressing.delete(user_real)
예제 #5
0
def test_store_lookup_delete():
    addressing.store(user_id, user_real)
    addr = addressing.lookup(user_id)
    assert_equal(addr, user_real)

    addressing.delete(user_id)
    assert_raises(KeyError, addressing.lookup, user_id)
예제 #6
0
def test_store_lookup_delete_with_dumb_addresses():
    addressing.store('"Zed Shaw" <*****@*****.**>', "fake")
    assert_equal("fake", addressing.lookup("*****@*****.**"))
    assert_equal("fake", addressing.lookup('"Zed Shaw" <*****@*****.**>'))
    addressing.delete("*****@*****.**")
    assert_raises(KeyError, addressing.lookup, "*****@*****.**")
    assert_raises(KeyError, addressing.lookup,
                  '"Zed Shaw" <*****@*****.**>')
예제 #7
0
파일: filter_tests.py 프로젝트: 3kwa/lamson
def setup():
    addressing.store(user_id, user)
    addressing.store(marketroid_id, marketroid)
    addressing.store(marketroid, marketroid_id)
예제 #8
0
def setup():
    addressing.store(user_id, user)
    addressing.store(marketroid_id, marketroid)
    addressing.store(marketroid, marketroid_id)
예제 #9
0
def test_real():
    addressing.store(user_id, user_real)
    assert_equal(addressing.real(user_id), user_real)
    addressing.delete(user_id)
예제 #10
0
def test_real():
    addressing.store(user_id, user_real)
    assert_equal(addressing.real(user_id), user_real)
    addressing.delete(user_id)