예제 #1
0
def test_parse_conference_address_recognizes_state_and_country_of_us_city():
    expected = {
        'cities': [
            'Waltham',
        ],
        'country_code': 'US',
        'place_name': '',
        'state': 'MA',
    }
    result = parse_conference_address('Waltham, Mass.')

    assert expected == result
예제 #2
0
def test_parse_conference_address_recognizes_country_of_non_us_city():
    expected = {
        'cities': [
            'Dubna',
        ],
        'country_code': 'SU',
        'place_name': '',
        'state': None,
    }
    result = parse_conference_address('Dubna, USSR')

    assert expected == result
예제 #3
0
def test_parse_conference_address_handles_empty_string():
    expected = {
        'cities': [
            '',
        ],
        'country_code': None,
        'postal_code': None,
        'state': None,
    }
    result = parse_conference_address('')

    assert expected == result
예제 #4
0
def test_parse_conference_address_handles_empty_string():
    expected = {}
    result = parse_conference_address('')

    assert expected == result