[test] Adding tests for known number of floors as it touches different parts of the address configs
This commit is contained in:
@@ -47,11 +47,23 @@ class TestAddressConfigs(unittest.TestCase):
|
|||||||
for i in xrange(10000):
|
for i in xrange(10000):
|
||||||
phrase = Floor.phrase(Floor.random(language, country=country), language, country=country)
|
phrase = Floor.phrase(Floor.random(language, country=country), language, country=country)
|
||||||
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
||||||
|
for i in xrange(1000):
|
||||||
|
phrase = Floor.phrase(None, language, country=country)
|
||||||
|
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
||||||
|
for i in xrange(1000):
|
||||||
|
phrase = Floor.phrase(None, language, country=country, num_floors=3)
|
||||||
|
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
||||||
|
|
||||||
def check_unit_phrases(self, language, country=None):
|
def check_unit_phrases(self, language, country=None):
|
||||||
for i in xrange(10000):
|
for i in xrange(10000):
|
||||||
phrase = Unit.phrase(Unit.random(language, country=country), language, country=country)
|
phrase = Unit.phrase(Unit.random(language, country=country), language, country=country)
|
||||||
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
||||||
|
for i in xrange(1000):
|
||||||
|
phrase = Unit.phrase(None, language, country=country)
|
||||||
|
self.assertTrue(self.valid_phrase(phrase), six.u('phrase was: {}').format(phrase))
|
||||||
|
for i in xrange(1000):
|
||||||
|
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))
|
||||||
|
|
||||||
def check_po_boxes(self, language, country=None):
|
def check_po_boxes(self, language, country=None):
|
||||||
for i in xrange(1000):
|
for i in xrange(1000):
|
||||||
|
|||||||
Reference in New Issue
Block a user