Skip to content

Commit

Permalink
Merge branch 'multisave'
Browse files Browse the repository at this point in the history
Conflicts:
	src/django_fields/tests.py
  • Loading branch information
defrex committed Jul 9, 2013
2 parents de1d60f + c5684ee commit 28e83c5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/django_fields/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,17 @@ def test_encryption_w_cipher(self):

def test_multiple_encryption_w_cipher(self):
"""
Test that the database values are actually encrypted when using
non-default cipher types.
Test that a single field can be reused without error.
"""
password = 'this is a password!!' # 20 chars
obj = CipherEncObject(password = password)
password = 'this is a password!!'
obj = CipherEncObject(password=password)
obj.save()
# The value from the retrieved object should be the same...
obj = CipherEncObject.objects.get(id=obj.id)
self.assertEqual(password, obj.password)

password = 'another password!!' # 20 chars
obj = CipherEncObject(password = password)
password = 'another password!!'
obj = CipherEncObject(password=password)
obj.save()
# The value from the retrieved object should be the same...
obj = CipherEncObject.objects.get(id=obj.id)
self.assertEqual(password, obj.password)

Expand Down

0 comments on commit 28e83c5

Please sign in to comment.