diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-31 18:16:11 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-31 18:16:11 +0100 |
commit | b98bfcfe20c9af59f69b7606c0351b4bbf344d00 (patch) | |
tree | 5da5ddd928f4bdf9eff103e13f6c72d08747899f /ishtar_common/tests.py | |
parent | 289e153c64ba5c8a87ed60fa1f8f2e7ef9634c78 (diff) | |
parent | 1c17748090f59acb36883ac114fb9cefdab47963 (diff) | |
download | Ishtar-b98bfcfe20c9af59f69b7606c0351b4bbf344d00.tar.bz2 Ishtar-b98bfcfe20c9af59f69b7606c0351b4bbf344d00.zip |
Merge branch 'develop' into develop-bootstrap
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r-- | ishtar_common/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index e107bd6fb..63d80d5ab 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -126,6 +126,7 @@ class CommandsTestCase(TestCase): q = models.Town.objects town_nb = q.count() first, union_start, union_end = '', '', [] + new_nums = [] for idx, town in enumerate(q.all()): x1 = float(idx) / 10 if not x1: @@ -140,6 +141,8 @@ class CommandsTestCase(TestCase): union_start += '{x2} 0.1'.format(x1=x1, x2=x2) union_end.append('{x2} 0'.format(x1=x1, x2=x2)) town.limit = l + town.year = 1792 + new_nums.append("{}-{}".format(town.numero_insee, town.year)) town.save() union = 'MULTIPOLYGON (((' + first + ", " + union_start + \ ", " + ", ".join(reversed(union_end)) + ", 0 0, " + first + ")))" @@ -157,6 +160,9 @@ class CommandsTestCase(TestCase): # no new town self.assertEqual(town_nb + 1, models.Town.objects.count()) + for parent_town in new.parents.all(): + self.assertIn(parent_town.numero_insee, new_nums) + class WizardTestFormData(object): """ |