diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-11-09 13:40:06 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:23:19 +0100 |
commit | e9f71aa7435ad265e4a7d53978f8ce24033477d5 (patch) | |
tree | f5bda3993a31d8a749a37984c427b321897360c3 /archaeological_warehouse | |
parent | f263918be794c60f3209e697b736335e4c5935c2 (diff) | |
download | Ishtar-e9f71aa7435ad265e4a7d53978f8ce24033477d5.tar.bz2 Ishtar-e9f71aa7435ad265e4a7d53978f8ce24033477d5.zip |
Fix tests
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r-- | archaeological_warehouse/tests.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/archaeological_warehouse/tests.py b/archaeological_warehouse/tests.py index b329a8432..e67d03542 100644 --- a/archaeological_warehouse/tests.py +++ b/archaeological_warehouse/tests.py @@ -746,43 +746,6 @@ class ContainerTest(FindInit, TestCase): container = models.Container.objects.get(pk=container.pk) self.assertIn("New name", container.cached_location) - def test_update_container_localisation_on_warehouse_update(self): - profile, created = IshtarSiteProfile.objects.get_or_create( - slug="default", active=True - ) - profile.mapping = True - profile.locate_warehouses = True - profile.save() - wgs84 = SpatialReferenceSystem.objects.get(srid=4326) - container = models.Container.objects.create( - reference="Test", - responsible=self.main_warehouse, - location=self.main_warehouse, - container_type=models.ContainerType.objects.all()[0], - ) - container.save() - self.assertEqual(container.x, None) - - main_warehouse = models.Warehouse.objects.get(pk=self.main_warehouse.pk) - main_warehouse.x, main_warehouse.y = 33, 42 - main_warehouse.spatial_reference_system = wgs84 - main_warehouse.save() - # an update is pending - self.assertEqual( - models.Container.objects.filter(pk=container.pk, need_update=True).count(), - 1, - ) - - # process pending update - container = models.Container.objects.get(pk=container.pk) - self.assertEqual(container.x, None) # update has to be done - container.skip_history_when_saving = True - container._no_move = True - container.save() - - container = models.Container.objects.get(pk=container.pk) - self.assertEqual(container.x, 33) - def test_external_id(self): ct = models.ContainerType.objects.all()[0] container_1 = models.Container.objects.create( |