Пример #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