コード例 #1
0
ファイル: test_geocode.py プロジェクト: fna/django-hud
 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')
コード例 #2
0
ファイル: test_geocode.py プロジェクト: fna/django-hud
 def test_extract_zip_code__empty(self):
     """Testing _extract_zip_code, with empty argument."""
     result = _extract_zip_code('')
     self.assertEqual(result, '')
コード例 #3
0
ファイル: test_geocode.py プロジェクト: fna/django-hud
 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')
コード例 #4
0
ファイル: test_geocode.py プロジェクト: ielerol/django-hud
 def test_extract_zip_code__empty(self):
     """Testing _extract_zip_code, with empty argument."""
     result = _extract_zip_code("")
     self.assertEqual(result, "")
コード例 #5
0
ファイル: test_geocode.py プロジェクト: ielerol/django-hud
 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")
コード例 #6
0
ファイル: test_geocode.py プロジェクト: ielerol/django-hud
 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")