summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-10-11 10:19:58 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:18 +0100
commit314e8ac660877752acf0a353e2833e4b0c500ccb (patch)
tree7ccc9e40dfa66e0e0e2da40a75f9af0ef4df0c2f /ishtar_common/tests.py
parent42e058c40b07672d20d680bb9c79c06d8c88a8bc (diff)
downloadIshtar-314e8ac660877752acf0a353e2833e4b0c500ccb.tar.bz2
Ishtar-314e8ac660877752acf0a353e2833e4b0c500ccb.zip
Geodata: manage m2m signal town association
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index cfd3544dd..7671f2fe4 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -3518,9 +3518,6 @@ class GeoVectorTest(TestCase):
self.assertEqual(town.main_geodata, geo_vector_town)
self.operation.towns.add(town)
- self._reinit_objects()
- # save need to be forced... keep it?
- self.operation.save()
self._reinit_objects()
self.assertEqual(self.operation.geodata.count(), 1)
@@ -3530,7 +3527,15 @@ class GeoVectorTest(TestCase):
self.assertEqual(self.base_find.geodata.count(), 1)
self.assertEqual(self.base_find.main_geodata, geo_vector_town)
- # test town remove
+ self.operation.towns.remove(town)
+
+ self._reinit_objects()
+ self.assertIsNone(self.operation.main_geodata)
+ self.assertEqual(self.operation.geodata.count(), 0)
+ self.assertIsNone(self.context_record.main_geodata)
+ self.assertEqual(self.context_record.geodata.count(), 0)
+ self.assertIsNone(self.base_find.main_geodata)
+ self.assertEqual(self.base_find.geodata.count(), 0)
class NewItems(TestCase):