Skip to content

Commit

Permalink
Remove with_request_context feature from logic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelboca committed Jan 18, 2022
1 parent f57e52d commit 4453738
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ckan/tests/logic/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def test_check_access_auth_user_obj_is_not_set():
assert context["auth_user_obj"] is None


@pytest.mark.usefixtures("clean_db", "with_request_context")
def test_check_access_auth_user_obj_is_set():
user = factories.User()
context = {"user": user["name"]}
Expand All @@ -37,7 +36,6 @@ def test_check_access_auth_user_obj_is_set():
assert context["auth_user_obj"].name == user["name"]


@pytest.mark.usefixtures("clean_db", "with_request_context")
def test_check_access_auth_user_obj_is_not_set_when_ignoring_auth():
user = factories.User()
context = {"user": user["name"], "ignore_auth": True}
Expand Down
4 changes: 2 additions & 2 deletions ckan/tests/logic/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def test_user_id_or_name_exists_empty():
validators.user_id_or_name_exists("", _make_context())


@pytest.mark.usefixtures("clean_db", "with_request_context")
@pytest.mark.usefixtures("clean_db")
def test_user_id_or_name_exists():
user = factories.User(name="username")
v = validators.user_id_or_name_exists(user["id"], _make_context())
Expand All @@ -783,7 +783,7 @@ def test_group_id_or_name_exists_empty():
validators.user_id_or_name_exists("", _make_context())


@pytest.mark.usefixtures("clean_db", "with_request_context")
@pytest.mark.usefixtures("clean_db")
def test_group_id_or_name_exists(group):
v = validators.group_id_or_name_exists(group["id"], _make_context())
assert v == group["id"]
Expand Down

0 comments on commit 4453738

Please sign in to comment.