summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_warehouse/tests.py')
-rw-r--r--archaeological_warehouse/tests.py37
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(