File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ from django .db import models
2+
13from django_mongodb_backend .fields import EncryptedCharField
24from django_mongodb_backend .models import EncryptedModel
35
46
57class Person (EncryptedModel ):
68 ssn = EncryptedCharField ("ssn" , max_length = 11 )
9+ name = models .CharField ("name" , max_length = 100 )
710
811 def __str__ (self ):
912 return self .ssn
Original file line number Diff line number Diff line change @@ -26,5 +26,5 @@ def test_encrypted_fields_map_on_instance(self):
2626 self .assertEqual (instance .encrypted_fields_map , expected )
2727
2828 def test_non_encrypted_fields_not_included (self ):
29- encrypted_field_names = Person .encrypted_fields_map .keys ()
30- self .assertNotIn ("ssn " , encrypted_field_names )
29+ encrypted_field_names = Person .encrypted_fields_map .get ( "fields" ). keys ()
30+ self .assertNotIn ("name " , encrypted_field_names )
You can’t perform that action at this time.
0 commit comments