diff options
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r-- | archaeological_context_records/tests.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index 1a4f7fa08..79dd502ac 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -651,22 +651,20 @@ class ContextRecordQATest(ContextRecordInit, TestCase): def test_bulk_update(self): c = Client() context_record_list = self.context_records[:2] - pks = "-".join([str(cr.pk) for cr in context_record_list]) - c.login(username=self.username, password=self.password) - response = c.get(reverse("contextrecord-qa-bulk-update", args=[pks])) - self.assertEqual(response.status_code, 200) - site = models.ArchaeologicalSite.objects.create(reference="3333", name="test") unit = models.Unit.objects.get(label="Anomalie") parcel = models.Parcel.objects.all().first() - - operation = models_ope.Operation.objects.all()[0] - + operation = context_record_list[0].operation parcel_2 = models.Parcel.objects.create( operation=operation, town=Town.objects.all()[0], public_domain=True ) + pks = "-".join([str(cr.pk) for cr in context_record_list]) + c.login(username=self.username, password=self.password) + response = c.get(reverse("contextrecord-qa-bulk-update", args=[pks])) + self.assertEqual(response.status_code, 200) + # verify the initial state for cr in context_record_list: self.assertEqual(parcel.operation, cr.operation) |