summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-11-08 18:22:50 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:19 +0100
commitcde3da21880c1242415b488b2e4563618387b0e7 (patch)
tree793c98bb5f70c37fb7930ea0e42dd551b50d2291 /archaeological_operations/tests.py
parent90c4e9f593912e9c28b12b5c4582adbcd7291245 (diff)
downloadIshtar-cde3da21880c1242415b488b2e4563618387b0e7.tar.bz2
Ishtar-cde3da21880c1242415b488b2e4563618387b0e7.zip
Remove deprecated geo test - Fix tests for v4
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index bfe8e3b11..5980a931a 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -193,7 +193,7 @@ class ImportTest(object):
"associated_group": group.pk,
"csv_sep": sep,
}
- form = forms_common.BaseImportForm(
+ form = forms_common.NewImportForm(
data=post_dict, files=file_dict, user=self.user
)
form.is_valid()
@@ -1800,9 +1800,11 @@ class ParcelTest(ImportTest, TestCase):
post_response = c.post("/operation-parcels-modify/" + str(operation.pk) + "/", data)
self.assertEqual(post_response.status_code, 200)
- self.assertContains(post_response, _("This parcel is associated with a context "
- "record. It can&#39;t be deleted.") # How to convert '&#39;' to ' ?
- )
+ res = post_response.content.decode("utf8")
+ expected = str(
+ _("This parcel is associated with a context record. It can't be deleted.")
+ ).replace("'", "&#39;")
+ self.assertIn(expected, res)
parcels = models.Parcel.objects.all()
self.assertEqual(parcels.count(), 1)
@@ -2675,7 +2677,7 @@ class CustomFormTest(TestCase, OperationInitTest):
step = "selec-operation_modification"
cls_wiz.wizard_post(c, url, step, {"pk": self.operations[0].pk})
- step = "collaborators-operation_modification"
+ step = "relations-operation_modification"
data = {
"{}{}-current_step".format(cls_wiz.url_name, cls_wiz.wizard_name): [step],
}
@@ -2683,7 +2685,7 @@ class CustomFormTest(TestCase, OperationInitTest):
self.assertNotEqual(response.status_code, 404)
CustomForm.objects.create(
name="Test2",
- form="operation-020-collaborators",
+ form="operation-080-relations",
available=True,
apply_to_all=True,
enabled=False,
@@ -4693,7 +4695,7 @@ class ApiTest(OperationInitTest, APITestCase):
response = self.client.post(url, params, follow=True)
self.assertIn(
- str(_("is not a valid JSON message")),
+ str(_("is not a valid JSON message")).replace("'", "&#39;"),
response.content.decode(),
)