mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
fixed test
This commit is contained in:
@@ -1,19 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="1" skipped="0" tests="4" time="34.839" timestamp="2024-08-18T12:55:39.540620" hostname="vabene-pc"><testcase classname="cookbook.tests.api.test_api_food" name="test_list_permission[arg0]" time="26.624" /><testcase classname="cookbook.tests.api.test_api_food" name="test_list_permission[arg3]" time="26.985" /><testcase classname="cookbook.tests.api.test_api_food" name="test_list_permission[arg1]" time="27.282"><failure message="assert 200 == 403 + where 200 = <Response status_code=200, "application/json">.status_code + where <Response status_code=200, "application/json"> = <bound method Client.get of <django.test.client.Client object at 0x0000017B4EB67350>>('/api/food/') + where <bound method Client.get of <django.test.client.Client object at 0x0000017B4EB67350>> = <django.test.client.Client object at 0x0000017B4EB67350>.get + and '/api/food/' = reverse('api:food-list')">arg = ['g1_s1', 403]
|
||||
request = <FixtureRequest for <Function test_list_permission[arg1]>>
|
||||
|
||||
@pytest.mark.parametrize("arg", [
|
||||
['a_u', 403],
|
||||
['g1_s1', 403],
|
||||
['u1_s1', 200],
|
||||
['a1_s1', 200],
|
||||
])
|
||||
def test_list_permission(arg, request):
|
||||
c = request.getfixturevalue(arg[0])
|
||||
> assert c.get(reverse(LIST_URL)).status_code == arg[1]
|
||||
E assert 200 == 403
|
||||
E + where 200 = <Response status_code=200, "application/json">.status_code
|
||||
E + where <Response status_code=200, "application/json"> = <bound method Client.get of <django.test.client.Client object at 0x0000017B4EB67350>>('/api/food/')
|
||||
E + where <bound method Client.get of <django.test.client.Client object at 0x0000017B4EB67350>> = <django.test.client.Client object at 0x0000017B4EB67350>.get
|
||||
E + and '/api/food/' = reverse('api:food-list')
|
||||
|
||||
test_api_food.py:90: AssertionError</failure></testcase><testcase classname="cookbook.tests.api.test_api_food" name="test_list_permission[arg2]" time="27.533" /></testsuite></testsuites>
|
||||
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="5" time="35.973" timestamp="2024-08-18T14:19:20.591136" hostname="vabene-pc"><testcase classname="cookbook.tests.api.test_api_space" name="test_list_permission[arg0]" time="27.231" /><testcase classname="cookbook.tests.api.test_api_space" name="test_list_permission[arg1]" time="27.784" /><testcase classname="cookbook.tests.api.test_api_space" name="test_list_permission[arg3]" time="28.126" /><testcase classname="cookbook.tests.api.test_api_space" name="test_list_permission[arg4]" time="28.153" /><testcase classname="cookbook.tests.api.test_api_space" name="test_list_permission[arg2]" time="28.177" /></testsuite></testsuites>
|
||||
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ DETAIL_URL = 'api:space-detail'
|
||||
|
||||
@pytest.mark.parametrize("arg", [
|
||||
['a_u', 403, 0],
|
||||
['g1_s1', 200, 0],
|
||||
['g1_s1', 200, 1],
|
||||
['u1_s1', 200, 1],
|
||||
['a1_s1', 200, 1],
|
||||
['a2_s1', 200, 1],
|
||||
|
||||
Reference in New Issue
Block a user