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"])
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'])
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"])
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"])
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'])
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'])
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'])
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'])