From 2b07ee826ae9cdcf1d7aec4fc882eb5fa9a3d41d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 15 Aug 2018 14:12:51 +0200 Subject: Fix tests --- ishtar_common/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index c2abab10c..8de8fda6e 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -1457,6 +1457,13 @@ class IshtarBasicTest(TestCase): town.year = 2050 town.save() town = models.Town.objects.get(numero_insee="99999") + self.assertEqual(town.cached_label, "Sin City - 99") + + models.Town.objects.create(name="Mega City", numero_insee="99999", + year=2051) + mega_city = models.Town.objects.get(numero_insee="99999", year=2051) + town.children.add(mega_city) + town = models.Town.objects.get(numero_insee="99999-2050") self.assertEqual(town.cached_label, "Sin City - 99 (2050)") -- cgit v1.2.3