示例#1
0
def test_normalize_zipcode_zip5_short():
    zipcode = '0890'
    res = address.normalize_zipcode(zipcode)

    eq(res, '')
示例#2
0
def test_normalize_zipcode_empty():
    zipcode = ''
    res = address.normalize_zipcode(zipcode)

    eq(res, '')
示例#3
0
def test_normalize_zipcode_zip5_str():
    zipcode = 'b8901-0000'
    res = address.normalize_zipcode(zipcode)

    eq(res, '')
示例#4
0
def test_normalize_zipcode_zip4_str():
    zipcode = '08901-bas'
    res = address.normalize_zipcode(zipcode)

    eq(res, '08901')
示例#5
0
def test_normalize_zipcode_dash():
    zipcode = '08901-0000'
    res = address.normalize_zipcode(zipcode)

    eq(res, '08901')
示例#6
0
def test_normalize_zipcode_nine_digits():
    zipcode = '089010000'
    res = address.normalize_zipcode(zipcode)

    eq(res, '08901')
示例#7
0
def test_normalize_zipcode_simple():
    zipcode = '08901'
    res = address.normalize_zipcode(zipcode)

    eq(res, '08901')