summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
authorCefin <kevon@tuta.io>2022-01-27 13:52:53 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:20:59 +0100
commit0f3baa049c81e336457d529542e439b0d6c4827d (patch)
treef92068da9e5fed6af5ad76cbd74ae1a1020f8109 /archaeological_operations/tests.py
parent85c707ffa667bfa90b66d32c4399dcdce5d90b8a (diff)
downloadIshtar-0f3baa049c81e336457d529542e439b0d6c4827d.tar.bz2
Ishtar-0f3baa049c81e336457d529542e439b0d6c4827d.zip
Operation - Parcels - Modify: beginning draft version of post tests #5227
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 84b684410..c2be8c050 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -1679,6 +1679,25 @@ class ParcelTest(ImportTest, TestCase):
self.assertContains(response, parcel_1.parcel_number)
self.assertContains(response, parcel_2.parcel_number)
+ data = {
+ "form-0-year": 2021,
+ "form-0-section": "SCT1",
+ "form-0-parcel_number": "001",
+ "form-0-town": town_2,
+ "form-1-year": 2021,
+ "form-1-section": "SCT1",
+ "form-1-parcel_number": "002",
+ "form-1-town": town_2,
+ }
+ post_response = c.post(reverse("operation-parcels-modify", data))
+
+ self.assertEqual(post_response.status_code, 200)
+ self.assertContains(post_response, town_2.name)
+ self.assertContains(post_response, 2021)
+ self.assertContains(post_response, "SCT1")
+ self.assertContains(post_response, "001")
+ self.assertContains(post_response, "002")
+
def create_orga(user):
orga_type, created = OrganizationType.objects.get_or_create(txt_idx="operator")