3232from .test_base import EncryptionTestCase
3333
3434
35- class EncryptedEmbeddedModelTests (EncryptionTestCase ):
35+ class EmbeddedModelTests (EncryptionTestCase ):
3636 def setUp (self ):
3737 self .billing = Billing (cc_type = "Visa" , cc_number = "4111111111111111" )
3838 self .patient_record = PatientRecord (ssn = "123-45-6789" , billing = self .billing )
3939 self .patient = Patient .objects .create (
4040 patient_name = "John Doe" , patient_id = 123456789 , patient_record = self .patient_record
4141 )
4242
43- def test_patient (self ):
43+ def test_object (self ):
4444 patient = Patient .objects .get (id = self .patient .id )
4545 self .assertEqual (patient .patient_record .ssn , "123-45-6789" )
4646 self .assertEqual (patient .patient_record .billing .cc_type , "Visa" )
4747 self .assertEqual (patient .patient_record .billing .cc_number , "4111111111111111" )
4848
4949
50- class EncryptedEmbeddedModelArrayTests (EncryptionTestCase ):
50+ class EmbeddedModelArrayTests (EncryptionTestCase ):
5151 def setUp (self ):
5252 self .actor1 = Actor (name = "Actor One" )
5353 self .actor2 = Actor (name = "Actor Two" )
@@ -62,7 +62,7 @@ def test_movie_actors(self):
6262 self .assertEqual (self .movie .cast [1 ].name , "Actor Two" )
6363
6464
65- class EncryptedFieldTests (EncryptionTestCase ):
65+ class FieldTests (EncryptionTestCase ):
6666 def assertEquality (self , model_cls , val ):
6767 model_cls .objects .create (value = val )
6868 fetched = model_cls .objects .get (value = val )
@@ -162,7 +162,7 @@ def test_time(self):
162162 )
163163
164164
165- class EncryptedFieldMixinTests (EncryptionTestCase ):
165+ class FieldMixinTests (EncryptionTestCase ):
166166 def test_null_true_raises_error (self ):
167167 with self .assertRaisesMessage (
168168 ValueError , "'null=True' is not supported for encrypted fields."
0 commit comments