diff --git a/cookbook/tests/api/docs/reports/tests/pytest.xml b/cookbook/tests/api/docs/reports/tests/pytest.xml index 0be3814cb..740c50efa 100644 --- a/cookbook/tests/api/docs/reports/tests/pytest.xml +++ b/cookbook/tests/api/docs/reports/tests/pytest.xml @@ -1 +1,65 @@ - \ No newline at end of file +arg = ['a1_s1', 200] +request = <FixtureRequest for <Function test_update[arg3]>> +obj_1 = <Sync: path> + + @pytest.mark.parametrize("arg", [ + ['a_u', 403], + ['g1_s1', 403], + ['u1_s1', 403], + ['a1_s1', 200], + ['g1_s2', 403], + ['u1_s2', 403], + ['a1_s2', 404], + ]) + def test_update(arg, request, obj_1): + c = request.getfixturevalue(arg[0]) +> print(reverse(DETAIL_URL, args={obj_1.id})) + +test_api_sync.py:83: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +..\..\..\venv\Lib\site-packages\django\test\client.py:1054: in patch + response = super().patch( +..\..\..\venv\Lib\site-packages\django\test\client.py:553: in patch + return self.generic( +..\..\..\venv\Lib\site-packages\django\test\client.py:609: in generic + return self.request(**r) +..\..\..\venv\Lib\site-packages\django\test\client.py:891: in request + self.check_exception(response) +..\..\..\venv\Lib\site-packages\django\test\client.py:738: in check_exception + raise exc_value +..\..\..\venv\Lib\site-packages\django\core\handlers\exception.py:55: in inner + response = get_response(request) +..\..\..\venv\Lib\site-packages\django\core\handlers\base.py:197: in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) +..\..\..\venv\Lib\site-packages\django\views\decorators\csrf.py:56: in wrapper_view + return view_func(*args, **kwargs) +..\..\..\venv\Lib\site-packages\rest_framework\viewsets.py:124: in view + return self.dispatch(request, *args, **kwargs) +..\..\..\venv\Lib\site-packages\rest_framework\views.py:509: in dispatch + response = self.handle_exception(exc) +..\..\..\venv\Lib\site-packages\rest_framework\views.py:469: in handle_exception + self.raise_uncaught_exception(exc) +..\..\..\venv\Lib\site-packages\rest_framework\views.py:480: in raise_uncaught_exception + raise exc +..\..\..\venv\Lib\site-packages\rest_framework\views.py:506: in dispatch + response = handler(request, *args, **kwargs) +..\..\..\venv\Lib\site-packages\rest_framework\mixins.py:82: in partial_update + return self.update(request, *args, **kwargs) +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +self = <cookbook.views.api.SyncViewSet object at 0x000001E5B35EDF70> +request = <rest_framework.request.Request: PATCH '/api/sync/1/'>, args = () +kwargs = {'pk': '1'}, partial = True, instance = <Sync: path> +serializer = SyncSerializer(<Sync: path>, context={'request': <rest_framework.request.Request: PATCH '/api/sync/1/'>, 'format': Non...ull=True, required=False) + created_at = DateTimeField(read_only=True) + updated_at = DateTimeField(read_only=True) + + def update(self, request, *args, **kwargs): + partial = kwargs.pop('partial', False) + instance = self.get_object() + serializer = self.get_serializer(instance, data=request.data, partial=partial) + serializer.is_valid(raise_exception=True) +> self.perform_update(serializer) +E TypeError: SyncViewSet.perform_update() missing 1 required positional argument: 'pk' + +..\..\..\venv\Lib\site-packages\rest_framework\mixins.py:68: TypeError \ No newline at end of file diff --git a/cookbook/tests/api/docs/reports/tests/tests.html b/cookbook/tests/api/docs/reports/tests/tests.html index 2c65d8696..bf9ec47ca 100644 --- a/cookbook/tests/api/docs/reports/tests/tests.html +++ b/cookbook/tests/api/docs/reports/tests/tests.html @@ -7,7 +7,7 @@

tests.html

-

Report generated on 10-Apr-2025 at 17:29:06 by pytest-html +

Report generated on 05-Jun-2025 at 16:19:27 by pytest-html v4.1.1

Environment

@@ -61,7 +61,7 @@

Summary

-

1 test took 00:00:23.

+

7 tests took 00:03:16.

(Un)check the boxes to filter the results.