Ejemplo n.º 1
0
 def test_all_country_codes(self) -> None:
     """Validate & render random addresses with all supported countries."""
     for country_code in supported_country_codes():
         address = random_address()
         address.country_code = country_code
         address.subdivision_code = None
         address.normalize()
         address.validate()
         address.render()
Ejemplo n.º 2
0
 def test_all_country_codes(self):
     """ Validate & render random addresses with all supported countries.
     """
     for country_code in supported_country_codes():
         address = random_address()
         address.country_code = country_code
         address.subdivision_code = None
         address.normalize()
         address.validate()
         address.render()
Ejemplo n.º 3
0
    def test_all_territory_codes(self):
        """ Validate & render random addresses with all supported territories.
        """
        for territory_code in supported_subdivision_codes():
            address = random_address()
            address.country_code = None
            address.subdivision_code = territory_code
            address.normalize(strict=False)
            address.validate()
            address.render()

        for territory_code in supported_country_codes():
            address = random_address()
            address.country_code = territory_code
            address.subdivision_code = None
            address.normalize(strict=False)
            address.validate()
            address.render()
Ejemplo n.º 4
0
    def test_all_territory_codes(self):
        """ Validate & render random addresses with all supported territories.
        """
        for territory_code in supported_subdivision_codes():
            address = random_address()
            address.country_code = None
            address.subdivision_code = territory_code
            address.normalize(strict=False)
            address.validate()
            address.render()

        for territory_code in supported_country_codes():
            address = random_address()
            address.country_code = territory_code
            address.subdivision_code = None
            address.normalize(strict=False)
            address.validate()
            address.render()
Ejemplo n.º 5
0
 def test_supported_country_codes(self):
     self.assertIn('FR', supported_country_codes())
     self.assertIn('FX', supported_country_codes())
     self.assertIn('UK', supported_country_codes())
     self.assertNotIn('FR-59', supported_country_codes())
Ejemplo n.º 6
0
 def test_supported_country_codes(self):
     self.assertIn('FR', supported_country_codes())
     self.assertIn('FX', supported_country_codes())
     self.assertIn('UK', supported_country_codes())
     self.assertNotIn('FR-59', supported_country_codes())
Ejemplo n.º 7
0
 def test_supported_country_codes(self) -> None:
     assert "FR" in supported_country_codes()
     assert "FX" in supported_country_codes()
     assert "UK" in supported_country_codes()
     assert "FR-59" not in supported_country_codes()