Skip to content

Commit

Permalink
Try to use SerializeMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Jun 17, 2024
1 parent bce7997 commit 9208662
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ boto3==1.34.126 # Required for Celery Broker AWS (SQS) support
netaddr==1.3.0
vulners==2.1.7
fontawesomefree==6.5.1
tblib==3.0.0
tblib==3.0.0
3 changes: 2 additions & 1 deletion unittests/test_apiv2_scan_import_options.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test.testcases import SerializeMixin
from django.urls import reverse
from rest_framework.authtoken.models import Token
from rest_framework.test import APIClient, APITestCase

from dojo.models import Finding, Test, Test_Type


class ScanImportOptionsTest(APITestCase):
class ScanImportOptionsTest(SerializeMixin, APITestCase):
"""
Test the options `skip_duplicates` and `close_old_findings` for the scan
import APIv2 endpoint with ZAP
Expand Down
3 changes: 2 additions & 1 deletion unittests/test_importers_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import uuid
from unittest.mock import patch

from django.test.testcases import SerializeMixin
from django.utils import timezone
from rest_framework.authtoken.models import Token
from rest_framework.test import APIClient
Expand Down Expand Up @@ -516,7 +517,7 @@ def test_reimport_with_invalid_parameters(self):
self.assertEqual(import0, ['product_name parameter missing'])


class TestImporterUtils(DojoAPITestCase):
class TestImporterUtils(SerializeMixin, DojoAPITestCase):
def setUp(self):
self.testuser, _ = User.objects.get_or_create(username="admin", is_superuser=True)
token, _ = Token.objects.get_or_create(user=self.testuser)
Expand Down

0 comments on commit 9208662

Please sign in to comment.