From 3de99810d5dc92be9a578d21b02bc36226339f05 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Mon, 1 Jul 2024 14:03:30 +0200 Subject: [PATCH] avoid deps problems --- georiviere/portal/tests/test_views/test_contribution.py | 4 ++-- georiviere/settings/__init__.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/georiviere/portal/tests/test_views/test_contribution.py b/georiviere/portal/tests/test_views/test_contribution.py index 97e8f2e2..1682505f 100644 --- a/georiviere/portal/tests/test_views/test_contribution.py +++ b/georiviere/portal/tests/test_views/test_contribution.py @@ -372,7 +372,7 @@ def test_create(self): "field_boolean": True, "contributed_at": "2020-01-01T00:00" } - response = self.client.post(self.get_contribution_url(), data=data) + response = self.client.post(self.get_contribution_url(), data=data, format='json') data = response.json() self.assertEqual(response.status_code, 201, data) @@ -385,7 +385,7 @@ def test_null_values_on_not_required(self): "field_float": 1.1, "contributed_at": "2020-01-01T00:00" } - response = self.client.post(self.get_contribution_url(), data=data) + response = self.client.post(self.get_contribution_url(), data=data, format='json') data = response.json() self.assertEqual(response.status_code, 201, data) self.assertEqual(data['field_float'], 1.1) diff --git a/georiviere/settings/__init__.py b/georiviere/settings/__init__.py index e80ae50d..b06a38a2 100644 --- a/georiviere/settings/__init__.py +++ b/georiviere/settings/__init__.py @@ -172,7 +172,6 @@ def construct_relative_path_mock(current_template_name, relative_name): ) REST_FRAMEWORK = { - "TEST_REQUEST_DEFAULT_FORMAT": "json", "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", "DEFAULT_PARSER_CLASSES": ( "rest_framework.parsers.JSONParser",