From 79c236e7eef57bd4ebfda743db1354c99806ffa0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 2 Feb 2018 16:36:58 +0100 Subject: No more test with spatialite :( Too much cool PostgreSQL features used. --- archaeological_operations/models.py | 11 ++--------- archaeological_operations/tests.py | 4 ---- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index d46d55089..14631bd10 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -489,8 +489,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, return list(self.context_record.all()) def _cached_labels_bulk_update(self): - if settings.TESTING and settings.USE_SPATIALITE_FOR_TESTS: - return self.context_record.model.cached_label_bulk_update(operation_id=self.pk) return True @@ -1470,13 +1468,8 @@ def parcel_post_save(sender, **kwargs): return if parcel.context_record.count(): - if settings.TESTING and settings.USE_SPATIALITE_FOR_TESTS: - for cr in parcel.context_record.all(): - cr.skip_history_when_saving = True - cr.save() - else: - parcel.context_record.model.cached_label_bulk_update( - parcel_id=parcel.id) + parcel.context_record.model.cached_label_bulk_update( + parcel_id=parcel.id) if parcel.operation and parcel.operation.pk and \ parcel.town not in list(parcel.operation.towns.all()): diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 6ad800e23..43dd57018 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -949,10 +949,6 @@ class OperationTest(TestCase, OperationInitTest): self.assertIn(key, operation.search_vector) def test_cache_bulk_update(self): - if settings.USE_SPATIALITE_FOR_TESTS: - # using views - can only be tested with postgresql - return - operation = self.operations[0] init_parcel = self.create_parcel()[0] operation.parcels.add(init_parcel) -- cgit v1.2.3