From 3f9b82de76b96fac8798eecfd4356f846f2b14cc Mon Sep 17 00:00:00 2001 From: Henry Cooksley Date: Fri, 13 Dec 2024 12:48:13 +0000 Subject: [PATCH] Remove ogl url reference --- api/applications/views/parties.py | 2 -- api/data_workspace/v0/tests/test_licence_views.py | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/api/applications/views/parties.py b/api/applications/views/parties.py index 86d9c8b9fc..63afd3aae7 100644 --- a/api/applications/views/parties.py +++ b/api/applications/views/parties.py @@ -9,7 +9,6 @@ from api.core.authentication import ExporterAuthentication from api.core.decorators import ( authorised_to_view_application, - allowed_party_type_for_open_application_goodstype_category, application_is_major_editable, ) from api.core.helpers import str_to_bool @@ -35,7 +34,6 @@ def party(self): party_on_application = application.active_parties.get(party_id=self.kwargs["party_pk"]) return party_on_application.party - @allowed_party_type_for_open_application_goodstype_category() @authorised_to_view_application(ExporterUser) @application_is_major_editable def post(self, request, pk): diff --git a/api/data_workspace/v0/tests/test_licence_views.py b/api/data_workspace/v0/tests/test_licence_views.py index c3ea182a35..239c12ca6f 100644 --- a/api/data_workspace/v0/tests/test_licence_views.py +++ b/api/data_workspace/v0/tests/test_licence_views.py @@ -15,7 +15,6 @@ def setUp(self): super().setUp() test_host = "http://testserver" self.licences = parse.urljoin(test_host, reverse("data_workspace:v0:dw-licences-only-list")) - self.ogl_list = parse.urljoin(test_host, reverse("data_workspace:v0:dw-ogl-only-list")) @override_settings(HAWK_AUTHENTICATION_ENABLED=True) def test_dw_view_licences(self): @@ -30,17 +29,3 @@ def test_dw_view_licences_fail_incorrect_hawk_key(self): self.client.credentials(HTTP_HAWK_AUTHENTICATION=sender.request_header, CONTENT_TYPE="application/json") with self.assertRaises(mohawk.exc.HawkFail): self.client.get(self.licences) - - @override_settings(HAWK_AUTHENTICATION_ENABLED=True) - def test_dw_view_ogl_types(self): - sender = get_hawk_sender("GET", self.ogl_list, None, settings.HAWK_LITE_DATA_WORKSPACE_CREDENTIALS) - self.client.credentials(HTTP_HAWK_AUTHENTICATION=sender.request_header, CONTENT_TYPE="application/json") - response = self.client.get(self.ogl_list) - self.assertEqual(response.status_code, status.HTTP_200_OK) - - @override_settings(HAWK_AUTHENTICATION_ENABLED=True) - def test_dw_view_ogl_fail_incorrect_hawk_key(self): - sender = get_hawk_sender("GET", self.ogl_list, None, "internal-frontend") - self.client.credentials(HTTP_HAWK_AUTHENTICATION=sender.request_header, CONTENT_TYPE="application/json") - with self.assertRaises(mohawk.exc.HawkFail): - self.client.get(self.ogl_list)