Skip to content

Commit

Permalink
fix ref to example app, update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Aug 11, 2016
1 parent 90d8a06 commit b9bffbb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
5 changes: 0 additions & 5 deletions django_crypto_fields/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,3 @@ def ready(self):
'Warning: Encryption mode MODE_CFB should not be used. \n'
' See django_crypto_fields.cryptor.py and comments \n'
' in pycrypto.blockalgo.py.\n'))


class TestDjangoCryptoFieldsApp(AppConfig):
name = 'django_crypto_fields'
model = ('example', 'crypt')
5 changes: 3 additions & 2 deletions django_crypto_fields/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'example',
'django_crypto_fields.apps.TestDjangoCryptoFieldsApp',
'django_revision.apps.AppConfig',
'example.apps.DjangoCryptoFieldsAppConfig',
'example.apps.AppConfig',
]

MIDDLEWARE_CLASSES = (
Expand Down
5 changes: 2 additions & 3 deletions django_crypto_fields/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from django.test import TestCase

from django_crypto_fields.fields.base_field import BaseField
from django_crypto_fields.exceptions import EncryptionLookupError

from example.models import TestModel

Expand All @@ -14,7 +13,7 @@ def test_encrypt_rsa(self):
test_model = TestModel()
for fld in test_model._meta.fields:
if isinstance(fld, BaseField):
name, path, args, kwargs = fld.deconstruct()
_, _, args, kwargs = fld.deconstruct()
new = BaseField(fld.algorithm, fld.mode, *args, **kwargs)
self.assertEqual(fld.algorithm, new.algorithm)
self.assertEqual(fld.mode, new.mode)
Expand Down Expand Up @@ -57,7 +56,7 @@ def test_iexact(self):
# def test_contains(self):
# TestModel.objects.create(firstname='Erik1', identity='11111111', comment='')
# self.assertRaises(EncryptionLookupError, TestModel.objects.filter, firstname__contains='k1')
#
#
# def test_icontains(self):
# TestModel.objects.create(firstname='Erik1', identity='11111111', comment='')
# self.assertRaises(EncryptionLookupError, TestModel.objects.filter, firstname__icontains='k1')
Expand Down
10 changes: 10 additions & 0 deletions example/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.apps import AppConfig as DjangoAppConfig
from django_crypto_fields.apps import AppConfig as DjangoCryptoFieldsAppConfigParent


class AppConfig(DjangoAppConfig):
name = 'example'


class DjangoCryptoFieldsAppConfig(DjangoCryptoFieldsAppConfigParent):
model = ('example', 'crypt')
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# see README if problems with pycrypto
Django
django_extensions==1.6.1
django_extensions
Unipath
pycrypto
mysqlclient
Expand Down

0 comments on commit b9bffbb

Please sign in to comment.