Ejemplo n.º 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"])
Ejemplo n.º 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'])
Ejemplo n.º 3
0
def test_msg_ser_from_dict():
    pre = {"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"])
Ejemplo n.º 4
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"])
Ejemplo n.º 5
0
def test_msg_ser_dictionary():
    pre = {"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'])
Ejemplo n.º 6
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'])
Ejemplo n.º 7
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'])
Ejemplo n.º 8
0
def test_msg_ser_dictionary():
    pre = {"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'])