summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index a4ac40376..e5e629884 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -1679,7 +1679,17 @@ class ParcelTest(ImportTest, TestCase):
self.assertContains(response, parcel_1.parcel_number)
self.assertContains(response, parcel_2.parcel_number)
- data = {
+ data = {}
+ for idx in range(2 + views.PARCEL_FORMSET_EXTRA_FORM):
+ data.update({
+ f"form-{idx}-pk": "",
+ f"form-{idx}-year": "",
+ f"form-{idx}-section": "",
+ f"form-{idx}-parcel_number": "",
+ f"form-{idx}-town": town_1.pk,
+ f"form-{idx}-DELETE": '',
+ })
+ data.update({
"form-0-pk": parcel_1.pk,
"form-0-year": 2021,
"form-0-section": "SCT1",
@@ -1694,7 +1704,7 @@ class ParcelTest(ImportTest, TestCase):
"form-2-section": "XXX",
"form-2-parcel_number": "003",
"form-2-town": town_2.pk,
- }
+ })
post_response = c.post("/operation-parcels-modify/" + str(operation.pk) + "/", data)
self.assertEqual(post_response.status_code, 200)
@@ -1719,7 +1729,6 @@ class ParcelTest(ImportTest, TestCase):
self.assertContains(response, "001", count=0)
deleted_parcel = models.Parcel.objects.filter(pk=parcel_1.pk)
- print(deleted_parcel)
self.assertEqual(deleted_parcel.count(), 0)
def create_orga(user):