diff options
| 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 | 
| commit | aa6419ac14bb0f53a455f9f674a870019eee46a3 (patch) | |
| tree | 793c98bb5f70c37fb7930ea0e42dd551b50d2291 /archaeological_operations/tests.py | |
| parent | 0111d674667bbec5dd67290695ba4e80cc5b1aba (diff) | |
| download | Ishtar-aa6419ac14bb0f53a455f9f674a870019eee46a3.tar.bz2 Ishtar-aa6419ac14bb0f53a455f9f674a870019eee46a3.zip  | |
Remove deprecated geo test - Fix tests for v4
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 16 | 
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't be deleted.") # How to convert ''' to ' ? -        ) +        res = post_response.content.decode("utf8") +        expected = str( +            _("This parcel is associated with a context record. It can't be deleted.") +        ).replace("'", "'") +        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("'", "'"),              response.content.decode(),          )  | 
