Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad0n20 committed Nov 22, 2024
1 parent 5bfc782 commit 96cb943
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
14 changes: 0 additions & 14 deletions addon_service/tests/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,6 @@ def jsonapi_ref(obj) -> dict:
}


def jsonapi_thru_account_ref(obj) -> dict:
return {
"type": "authorized-accounts",
"id": obj.pk,
}


def jsonapi_thru_addon_ref(obj) -> dict:
return {
"type": "configured-addons",
"id": obj.pk,
}


def get_test_request(user=None, method="get", path="", cookies=None):
_factory_method = getattr(APIRequestFactory(), method)
_request = _factory_method(path) # note that path is optional for view tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
from addon_service.tests import _factories
from addon_service.tests._helpers import (
MockOSF,
jsonapi_thru_account_ref,
jsonapi_thru_addon_ref,
jsonapi_ref,
)


Expand Down Expand Up @@ -95,11 +94,9 @@ def _post_invocation(
):
_relationships = {}
if thru_addon is not None:
_relationships["thru_addon"] = {"data": jsonapi_thru_addon_ref(thru_addon)}
_relationships["thru_addon"] = {"data": jsonapi_ref(thru_addon)}
if thru_account is not None:
_relationships["thru_account"] = {
"data": jsonapi_thru_account_ref(thru_account)
}
_relationships["thru_account"] = {"data": jsonapi_ref(thru_account)}
_payload = {
"data": {
"type": "addon-operation-invocations",
Expand Down

0 comments on commit 96cb943

Please sign in to comment.