From 4a2fb83b706f940b98dc8c726b55cd06427a204d Mon Sep 17 00:00:00 2001 From: kiblik <5609770+kiblik@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:20:46 +0200 Subject: [PATCH] Try to use SerializeMixin in imports --- unittests/test_rest_framework.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/unittests/test_rest_framework.py b/unittests/test_rest_framework.py index ce1ad77da16..4d32c6ebe59 100644 --- a/unittests/test_rest_framework.py +++ b/unittests/test_rest_framework.py @@ -9,6 +9,7 @@ from unittest.mock import ANY, MagicMock, call, patch from django.contrib.auth.models import Permission +from django.test.testcases import SerializeMixin from django.urls import reverse from drf_spectacular.drainage import GENERATOR_STATS from drf_spectacular.settings import spectacular_settings @@ -1763,7 +1764,7 @@ def test_user_should_not_have_access_to_product_3_in_detail(self): self.assertEqual(response.status_code, 404) -class ImportScanTest(BaseClass.BaseClassTest): +class ImportScanTest(SerializeMixin, BaseClass.BaseClassTest): fixtures = ['dojo_testdata.json'] def __init__(self, *args, **kwargs): @@ -2017,7 +2018,7 @@ def test_create_authorized_product_name_engagement_name_auto_create_product_type reimporter_mock.assert_not_called() -class ReimportScanTest(DojoAPITestCase): +class ReimportScanTest(SerializeMixin, DojoAPITestCase): fixtures = ['dojo_testdata.json'] def setUp(self): @@ -2695,7 +2696,7 @@ def __init__(self, *args, **kwargs): BaseClass.RESTEndpointTest.__init__(self, *args, **kwargs) -class ImportLanguagesTest(BaseClass.BaseClassTest): +class ImportLanguagesTest(SerializeMixin, BaseClass.BaseClassTest): fixtures = ['dojo_testdata.json'] def __init__(self, *args, **kwargs):