def test_postaladdress_from_jsonl(): item = Item() item.jsonl = ('{"addressCountry":"GB",' '"addressLocality":"Holborn",' '"addressRegion":"London",' '"postcode":"WC2B 6NH",' '"streetAddress":"Aviation House, 125 Kingsway"}') assert item.streetAddress == "Aviation House, 125 Kingsway" assert item.addressLocality == "Holborn" assert item.addressRegion == "London" assert item.postcode == "WC2B 6NH" assert item.addressCountry == "GB"
def test_set_of_tags_from_jsonl(): item = Item() item.jsonl = ('{"fields":["a","b","c"],"name":"foo"}') assert item.name == 'foo' assert item.fields == ['a', 'b', 'c']
def test_set_of_tags_from_jsonl(): item = Item() item.jsonl = '{"fields":["a","b","c"],"name":"foo"}' assert item.name == "foo" assert item.fields == ["a", "b", "c"]
def test_empty_item_from_jsonl(): item = Item() item.jsonl = ('{}') assert item.jsonl == ('{}')
def test_empty_item_from_jsonl(): item = Item() item.jsonl = "{}" assert item.jsonl == ("{}")