Skip to content

Commit

Permalink
Remove ogl url reference
Browse files Browse the repository at this point in the history
  • Loading branch information
hnryjmes committed Dec 13, 2024
1 parent ef3667f commit 3f9b82d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions api/applications/views/parties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down
15 changes: 0 additions & 15 deletions api/data_workspace/v0/tests/test_licence_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)

0 comments on commit 3f9b82d

Please sign in to comment.