Esempio n. 1
0
 def test_extract_zip_code__zipcode(self):
     """Testing _extract_zip_code, with zip code."""
     result = _extract_zip_code('20005')
     self.assertEqual(result, '20005')
     result = _extract_zip_code('20005-1999')
     self.assertEqual(result, '20005-1999')
Esempio n. 2
0
 def test_extract_zip_code__empty(self):
     """Testing _extract_zip_code, with empty argument."""
     result = _extract_zip_code('')
     self.assertEqual(result, '')
Esempio n. 3
0
 def test_extract_zip_code__address(self):
     """Testing _extract_zip_code, with a key generated from an address."""
     result = _extract_zip_code('123 NONE SOME ST.|WASHINGTON,DC|20005')
     self.assertEqual(result, '20005')
Esempio n. 4
0
 def test_extract_zip_code__empty(self):
     """Testing _extract_zip_code, with empty argument."""
     result = _extract_zip_code("")
     self.assertEqual(result, "")
Esempio n. 5
0
 def test_extract_zip_code__address(self):
     """Testing _extract_zip_code, with a key generated from an address."""
     result = _extract_zip_code("123 NONE SOME ST.|WASHINGTON,DC|20005")
     self.assertEqual(result, "20005")
Esempio n. 6
0
 def test_extract_zip_code__zipcode(self):
     """Testing _extract_zip_code, with zip code."""
     result = _extract_zip_code("20005")
     self.assertEqual(result, "20005")
     result = _extract_zip_code("20005-1999")
     self.assertEqual(result, "20005-1999")