Ejemplo n.º 1
0
 def test_numbers(self):
     assert normalize_street('2nd AVENUE') == 'SECOND AVENUE'
     assert normalize_street('2nd AVENUE.') == 'SECOND AVENUE'
     assert normalize_street('2 ave') == 'SECOND AVENUE'
     assert normalize_street('SECOND ave') == 'SECOND AVENUE'
     assert normalize_street('FIRST ave') == 'FIRST AVENUE'
     assert normalize_street('1ST E. AVE') == 'FIRST EAST AVENUE'
Ejemplo n.º 2
0
 def test_aliases(self):
     result = 'ADAM CLAYTON POWELL JR BOULEVARD'
     assert normalize_street('ADAM CLAYTON POWELL') == result
     assert normalize_street('ADAM CLAYTON POWELL JR') == result
     assert normalize_street('ADAM CLAYTON POWELL JR BLVD') == result
     assert normalize_street(
         'AVENUE OF AMERICAS') == 'AVENUE OF THE AMERICAS'
     assert normalize_street('COLLEGE PT BLVD') == 'COLLEGE POINT BOULEVARD'
     assert normalize_street(
         'COLLEGE PT. BLVD') == 'COLLEGE POINT BOULEVARD'
     assert normalize_street('CO-OP CITY') == 'COOP CITY'
Ejemplo n.º 3
0
 def test_broadway(self):
     assert normalize_street('bdwy') == 'BROADWAY'
     assert normalize_street('W BROAD WAY') == 'WEST BROADWAY'
Ejemplo n.º 4
0
 def test_saints(self):
     assert normalize_street('ST. MARKS') == 'SAINT MARKS'
     assert normalize_street('W. ST JAMES ST.') == 'WEST SAINT JAMES STREET'
Ejemplo n.º 5
0
 def test_blvd_parkway(self):
     assert normalize_street('queens BLVD') == 'QUEENS BOULEVARD'
     assert normalize_street('OCEAN PKWY N') == 'OCEAN PARKWAY NORTH'
Ejemplo n.º 6
0
 def test_ave(self):
     assert normalize_street('AVENUE W') == 'AVENUE W'
Ejemplo n.º 7
0
 def test_simple_address(self):
     assert normalize_street('123 Main Street') == '123RD MAIN STREET'
Ejemplo n.º 8
0
    def test_street(self):
        assert normalize_street('102nd ST') == '102ND STREET'
        assert normalize_street('E 102nd ST') == 'EAST 102ND STREET'
        assert normalize_street('E 102nd ST') == 'EAST 102ND STREET'
        assert normalize_street('W 3rd ST.') == 'WEST THIRD STREET'
        assert normalize_street('S 3rd ST') == 'SOUTH THIRD STREET'
        assert normalize_street('North 10 ST') == 'NORTH TENTH STREET'

        assert normalize_street('RIVERSIDE DRIVE') == 'RIVERSIDE DRIVE'
        assert normalize_street('RIVERSIDE DR E') == 'RIVERSIDE DRIVE EAST'
        assert normalize_street('CAMPBELL DR.') == 'CAMPBELL DRIVE'
        assert normalize_street('SOME TERRACE') == 'SOME TERRACE'
        assert normalize_street('SOME PLAZA') == 'SOME PLAZA'
        assert normalize_street('SOME ST STATION') == 'SOME STREET STATION'
Ejemplo n.º 9
0
 def test_place_lane(self):
     assert normalize_street('313 PL N.') == '313TH PLACE NORTH'
     assert normalize_street('302 LN') == '302ND LANE'
Ejemplo n.º 10
0
 def test_part(self):
     assert normalize_street(
         'VAN CORTLANDT PK SO') == 'VAN CORTLANDT PARK SOUTH'
Ejemplo n.º 11
0
 def test_remove(self):
     assert normalize_street('78TH ST - BENSONHURST') == '78TH STREET'