File tree Expand file tree Collapse file tree 4 files changed +14
-13
lines changed Expand file tree Collapse file tree 4 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 1+ from django .test import TestCase
2+
3+
4+ class EncryptionTestCase (TestCase ):
5+ databases = {"default" , "encrypted" }
6+ maxDiff = None
Original file line number Diff line number Diff line change 2727 Patient ,
2828 PatientRecord ,
2929)
30+ from .test_base import EncryptionTestCase
3031
3132
3233@skipUnlessDBFeature ("supports_queryable_encryption" )
33- class PatientModelTests (TestCase ):
34- databases = {"default" , "encrypted" }
35-
34+ class PatientModelTests (EncryptionTestCase ):
3635 def setUp (self ):
3736 self .billing = Billing (cc_type = "Visa" , cc_number = "4111111111111111" )
3837 self .patient_record = PatientRecord (ssn = "123-45-6789" , billing = self .billing )
Original file line number Diff line number Diff line change 22
33from bson import json_util
44from django .core .management import call_command
5- from django .test import TestCase , modify_settings , skipUnlessDBFeature
5+ from django .test import modify_settings , skipUnlessDBFeature
6+
7+ from .test_base import EncryptionTestCase
68
79
810@skipUnlessDBFeature ("supports_queryable_encryption" )
911@modify_settings (INSTALLED_APPS = {"prepend" : "django_mongodb_backend" })
10- class CommandTests (TestCase ):
11- databases = {"default" , "encrypted" }
12- maxDiff = None
13-
12+ class CommandTests (EncryptionTestCase ):
1413 # Expected encrypted field maps for all Encrypted* models
1514 expected_maps = {
1615 "encryption__patientrecord" : {
Original file line number Diff line number Diff line change 11from django .db import connections
2- from django .test import TestCase
32
43from . import models
4+ from .test_base import EncryptionTestCase
55
66
7- class SchemaTests (TestCase ):
8- databases = {"default" , "encrypted" }
9- maxDiff = None
10-
7+ class SchemaTests (EncryptionTestCase ):
118 # Expected encrypted fields map per model
129 expected_map = {
1310 "PatientRecord" : {
You can’t perform that action at this time.
0 commit comments