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
+
1
3
from django_mongodb_backend .fields import EncryptedCharField
2
4
from django_mongodb_backend .models import EncryptedModel
3
5
4
6
5
7
class Person (EncryptedModel ):
6
8
ssn = EncryptedCharField ("ssn" , max_length = 11 )
9
+ name = models .CharField ("name" , max_length = 100 )
7
10
8
11
def __str__ (self ):
9
12
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):
26
26
self .assertEqual (instance .encrypted_fields_map , expected )
27
27
28
28
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