Beispiel #1
0
def test_address_deser():
    pre = AddressClaim(street_address="Kasamark 114", locality="Umea", country="Sweden")

    adc = address_deser(pre.to_json(), sformat="json")
    assert _eq(adc.keys(), ["street_address", "locality", "country"])

    adc = address_deser(pre.to_dict(), sformat="json")
    assert _eq(adc.keys(), ["street_address", "locality", "country"])
Beispiel #2
0
def test_address_deser():
    pre = AddressClaim(street_address="Kasamark 114", locality="Umea",
                       country="Sweden")

    adc = address_deser(pre.to_json(), format="json")
    assert _eq(adc.keys(), ['street_address', 'locality', 'country'])

    adc = address_deser(pre.to_dict(), format="json")
    assert _eq(adc.keys(), ['street_address', 'locality', 'country'])
Beispiel #3
0
def test_msg_ser_dict():
    pre = AddressClaim(street_address="Kasamark 114", locality="Umea", country="Sweden")

    ser = msg_ser(pre, "dict")

    adc = address_deser(ser, "dict")
    assert _eq(adc.keys(), ["street_address", "locality", "country"])
Beispiel #4
0
def test_msg_ser_urlencoded():
    pre = AddressClaim(street_address="Kasamark 114", locality="Umea",
                       country="Sweden")

    ser = msg_ser(pre, "urlencoded")

    adc = address_deser(ser, "urlencoded")
    assert _eq(adc.keys(), ['street_address', 'locality', 'country'])