summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_operations/tests.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index c2be8c050..738061ab1 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -1688,8 +1688,12 @@ class ParcelTest(ImportTest, TestCase):
"form-1-section": "SCT1",
"form-1-parcel_number": "002",
"form-1-town": town_2,
+ "form-2-year": 2011,
+ "form-2-section": "XXX",
+ "form-2-parcel_number": "003",
+ "form-2-town": town_2,
}
- post_response = c.post(reverse("operation-parcels-modify", data))
+ post_response = c.post("/operation-parcels-modify/" + str(operation.pk) + "/", data)
self.assertEqual(post_response.status_code, 200)
self.assertContains(post_response, town_2.name)
@@ -1697,6 +1701,18 @@ class ParcelTest(ImportTest, TestCase):
self.assertContains(post_response, "SCT1")
self.assertContains(post_response, "001")
self.assertContains(post_response, "002")
+ self.assertContains(post_response, "003")
+ self.assertContains(post_response, "XXX")
+
+ data["form-0-DELETE"] = True
+
+ post_response_deletion = c.post("/operation-parcels-modify/" + str(operation.pk) + "/", data)
+
+ self.assertEqual(post_response_deletion.status_code, 200)
+
+ response = c.get(reverse("operation-parcels-modify", kwargs={"pk": operation.pk}))
+
+ self.assertContains(response, "001", count=0)
def create_orga(user):