From 13718355ccfdce19f95d03da3c08ad11607b64d0 Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 4 Aug 2016 17:52:15 -0400 Subject: [PATCH] [test] Test zones in address configs --- scripts/geodata/tests/test_address_configs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/geodata/tests/test_address_configs.py b/scripts/geodata/tests/test_address_configs.py index 4a3816ae..fa46397e 100644 --- a/scripts/geodata/tests/test_address_configs.py +++ b/scripts/geodata/tests/test_address_configs.py @@ -65,6 +65,11 @@ class TestAddressConfigs(unittest.TestCase): phrase = Unit.phrase(Unit.random(language, country=country, num_floors=3, num_basements=1), language, country=country) self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase)) + for zone in ('commercial', 'industrial', 'university'): + for i in xrange(1000): + phrase = Unit.phrase(Unit.random(language, country=country), language, country=country, zone=zone) + self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase)) + def check_po_boxes(self, language, country=None): for i in xrange(1000): phrase = POBox.phrase(POBox.random(language, country=country), language, country=country)