|
18 | 18 | ######################################################################### |
19 | 19 | import copy |
20 | 20 | from unittest import TestCase |
21 | | -from django.test import override_settings |
22 | 21 |
|
23 | 22 | from unittest.mock import patch |
24 | 23 | from datetime import datetime, timedelta |
|
32 | 31 | from geonode.geoserver.helpers import set_attributes |
33 | 32 | from geonode.tests.base import GeoNodeBaseTestSupport |
34 | 33 | from geonode.br.management.commands.utils.utils import ignore_time |
35 | | -from geonode.utils import copy_tree, get_supported_datasets_file_types, bbox_to_wkt |
36 | | -from geonode import settings |
| 34 | +from geonode.utils import copy_tree, bbox_to_wkt |
37 | 35 |
|
38 | 36 |
|
39 | 37 | class TestCopyTree(GeoNodeBaseTestSupport): |
@@ -205,39 +203,6 @@ def setUp(self): |
205 | 203 | }, |
206 | 204 | ] |
207 | 205 |
|
208 | | - @override_settings( |
209 | | - ADDITIONAL_DATASET_FILE_TYPES=[ |
210 | | - {"id": "dummy_type", "label": "Dummy Type", "format": "dummy", "ext": ["dummy"]}, |
211 | | - ] |
212 | | - ) |
213 | | - def test_should_append_additional_type_if_config_is_provided(self): |
214 | | - prev_count = len(settings.SUPPORTED_DATASET_FILE_TYPES) |
215 | | - supported_types = get_supported_datasets_file_types() |
216 | | - supported_keys = [t.get("id") for t in supported_types] |
217 | | - self.assertIn("dummy_type", supported_keys) |
218 | | - self.assertEqual(len(supported_keys), prev_count + 1) |
219 | | - |
220 | | - @override_settings( |
221 | | - ADDITIONAL_DATASET_FILE_TYPES=[ |
222 | | - { |
223 | | - "id": "shp", |
224 | | - "label": "Replaced type", |
225 | | - "format": "vector", |
226 | | - "ext": ["shp"], |
227 | | - "requires": ["shp", "prj", "dbf", "shx"], |
228 | | - "optional": ["xml", "sld"], |
229 | | - }, |
230 | | - ] |
231 | | - ) |
232 | | - def test_should_replace_the_type_id_if_already_exists(self): |
233 | | - prev_count = len(settings.SUPPORTED_DATASET_FILE_TYPES) |
234 | | - supported_types = get_supported_datasets_file_types() |
235 | | - supported_keys = [t.get("id") for t in supported_types] |
236 | | - self.assertIn("shp", supported_keys) |
237 | | - self.assertEqual(len(supported_keys), prev_count) |
238 | | - shp_type = [t for t in supported_types if t["id"] == "shp"][0] |
239 | | - self.assertEqual(shp_type["label"], "Replaced type") |
240 | | - |
241 | 206 |
|
242 | 207 | class TestRegionsCrossingDateLine(TestCase): |
243 | 208 | def setUp(self): |
|
0 commit comments