Skip to content

Commit

Permalink
Fix test errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernstein committed May 31, 2024
1 parent cf23fda commit 2c38cfc
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions tests/manager/api/admin/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def test_edit(self, fixture: AdminRouteFixture):
)

def test_suppression_post(self, fixture: AdminRouteFixture):
url = "/admin/works/<identifier_type>/an/identifier/suppress"
url = "/admin/works/<identifier_type>/an/identifier/suppression"
fixture.assert_authenticated_request_calls(
url,
fixture.controller.suppression, # type: ignore
Expand All @@ -373,17 +373,6 @@ def test_suppression_post(self, fixture: AdminRouteFixture):
http_method="POST",
)

# TODO: when /suppress end point is removed (currently deprecated) we'll want to remove the following two lines
# since these tests will start failing here.
url = "/admin/works/<identifier_type>/an/identifier/suppress"
fixture.assert_authenticated_request_calls(
url,
fixture.controller.suppress, # type: ignore
"<identifier_type>",
"an/identifier",
http_method="POST",
)

def test_suppression_delete(self, fixture: AdminRouteFixture):
url = "/admin/works/<identifier_type>/an/identifier/suppression"
fixture.assert_authenticated_request_calls(
Expand All @@ -394,19 +383,22 @@ def test_suppression_delete(self, fixture: AdminRouteFixture):
http_method="DELETE",
)

# TODO: when /suppress end point is removed (currently deprecated we'll want to remove the following two lines
@DeprecationWarning
def test_suppress(self, fixture: AdminRouteFixture):
# TODO: when /suppress end point is removed (currently deprecated) we'll want to remove this test
# since these tests will start failing here.
url = "/admin/works/<identifier_type>/an/identifier/suppress"
fixture.assert_authenticated_request_calls(
url,
fixture.controller.unsuppress, # type: ignore
fixture.controller.suppress, # type: ignore
"<identifier_type>",
"an/identifier",
http_method="DELETE",
http_method="POST",
)

@DeprecationWarning
def test_unsuppress(self, fixture: AdminRouteFixture):
# TODO when deprecated /unsuppress endpoint is removed we'll want to remove this test.
url = "/admin/works/<identifier_type>/an/identifier/unsuppress"
fixture.assert_authenticated_request_calls(
url,
Expand Down

0 comments on commit 2c38cfc

Please sign in to comment.