From fcf9f30af0e407e238e2174c5528cf00b7650a9c Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 25 Sep 2024 16:28:36 +0200 Subject: [PATCH] fixed space test to reflect new logic --- cookbook/tests/api/test_api_space.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cookbook/tests/api/test_api_space.py b/cookbook/tests/api/test_api_space.py index a9b2a27a9..8e7c635c5 100644 --- a/cookbook/tests/api/test_api_space.py +++ b/cookbook/tests/api/test_api_space.py @@ -13,11 +13,11 @@ DETAIL_URL = 'api:space-detail' @pytest.mark.parametrize("arg", [ - ['a_u', 403, 0], - ['g1_s1', 200, 1], - ['u1_s1', 200, 1], - ['a1_s1', 200, 1], - ['a2_s1', 200, 1], + ['a_u', 403], + ['g1_s1', 200], + ['u1_s1', 200], + ['a1_s1', 200], + ['a2_s1', 200], ]) def test_list_permission(arg, request, space_1, a1_s1): space_1.created_by = auth.get_user(a1_s1) @@ -25,8 +25,6 @@ def test_list_permission(arg, request, space_1, a1_s1): c = request.getfixturevalue(arg[0]) result = c.get(reverse(LIST_URL)) assert result.status_code == arg[1] - if arg[1] == 200: - assert len(json.loads(result.content)) == arg[2] def test_list_multiple(u1_s1, space_1, space_2):