Exemplo n.º 1
0
def test_trim_csv_headings():
    item = Item()
    item.csv = (
        '"  addressCountry","addressLocality  "," addressRegion","postcode"," streetAddress"\r\n'  # NOQA
        '"GB","Holborn","London","WC2B 6NH","Aviation House, 125 Kingsway"\r\n'  # NOQA
    )

    assert item.streetAddress == "Aviation House, 125 Kingsway"
    assert item.addressLocality == "Holborn"
    assert item.addressRegion == "London"
    assert item.postcode == "WC2B 6NH"
    assert item.addressCountry == "GB"
Exemplo n.º 2
0
def test_empty_item_from_csv():
    item = Item()
    item.csv = ""
    assert item.csv == ("")
def test_empty_item_from_csv():
    item = Item()
    item.csv = ('')
    assert item.csv == ('')