32
32
from .test_base import EncryptionTestCase
33
33
34
34
35
- class EncryptedEmbeddedModelTests (EncryptionTestCase ):
35
+ class EmbeddedModelTests (EncryptionTestCase ):
36
36
def setUp (self ):
37
37
self .billing = Billing (cc_type = "Visa" , cc_number = "4111111111111111" )
38
38
self .patient_record = PatientRecord (ssn = "123-45-6789" , billing = self .billing )
39
39
self .patient = Patient .objects .create (
40
40
patient_name = "John Doe" , patient_id = 123456789 , patient_record = self .patient_record
41
41
)
42
42
43
- def test_patient (self ):
43
+ def test_object (self ):
44
44
patient = Patient .objects .get (id = self .patient .id )
45
45
self .assertEqual (patient .patient_record .ssn , "123-45-6789" )
46
46
self .assertEqual (patient .patient_record .billing .cc_type , "Visa" )
47
47
self .assertEqual (patient .patient_record .billing .cc_number , "4111111111111111" )
48
48
49
49
50
- class EncryptedEmbeddedModelArrayTests (EncryptionTestCase ):
50
+ class EmbeddedModelArrayTests (EncryptionTestCase ):
51
51
def setUp (self ):
52
52
self .actor1 = Actor (name = "Actor One" )
53
53
self .actor2 = Actor (name = "Actor Two" )
@@ -62,7 +62,7 @@ def test_movie_actors(self):
62
62
self .assertEqual (self .movie .cast [1 ].name , "Actor Two" )
63
63
64
64
65
- class EncryptedFieldTests (EncryptionTestCase ):
65
+ class FieldTests (EncryptionTestCase ):
66
66
def assertEquality (self , model_cls , val ):
67
67
model_cls .objects .create (value = val )
68
68
fetched = model_cls .objects .get (value = val )
@@ -162,7 +162,7 @@ def test_time(self):
162
162
)
163
163
164
164
165
- class EncryptedFieldMixinTests (EncryptionTestCase ):
165
+ class FieldMixinTests (EncryptionTestCase ):
166
166
def test_null_true_raises_error (self ):
167
167
with self .assertRaisesMessage (
168
168
ValueError , "'null=True' is not supported for encrypted fields."
0 commit comments