From 2614c31d3404032396458445facfdd0ad15721c0 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Wed, 3 Aug 2016 16:40:09 +0200 Subject: [PATCH] Updated outdated dependencies #24 django 1.10 django-reversion 2.0.6 django-sortedm2m 1.3.2 Closes #24 --- django_netjsonconfig/fixtures/test_users.json | 17 ----------------- django_netjsonconfig/tests/test_admin.py | 6 +++++- django_netjsonconfig/tests/test_views.py | 5 ++++- requirements.txt | 6 +++--- 4 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 django_netjsonconfig/fixtures/test_users.json diff --git a/django_netjsonconfig/fixtures/test_users.json b/django_netjsonconfig/fixtures/test_users.json deleted file mode 100644 index ed453c1..0000000 --- a/django_netjsonconfig/fixtures/test_users.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "model": "auth.user", - "pk": 1, - "fields": { - "username": "admin", - "password": "md5$C2xwUqHfBz4P$f37f9e6f4f076b1239a5c5dff2c8a2ab", - "first_name": "Admin", - "last_name": "Admin", - "email": "admin@admin.org", - "is_active": true, - "is_staff": true, - "is_superuser": true, - "groups": [] - } - } -] diff --git a/django_netjsonconfig/tests/test_admin.py b/django_netjsonconfig/tests/test_admin.py index 016ecea..e4881df 100644 --- a/django_netjsonconfig/tests/test_admin.py +++ b/django_netjsonconfig/tests/test_admin.py @@ -1,5 +1,6 @@ import json +from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase @@ -10,11 +11,14 @@ class TestAdmin(TestCase): """ tests for Config model """ - fixtures = ['test_templates', 'test_users'] + fixtures = ['test_templates'] maxDiff = None TEST_KEY = '00:11:22:33:44:55' def setUp(self): + User.objects.create_superuser(username='admin', + password='tester', + email='admin@admin.com') self.client.login(username='admin', password='tester') def test_change_config_clean_templates(self): diff --git a/django_netjsonconfig/tests/test_views.py b/django_netjsonconfig/tests/test_views.py index 14849bb..d0d41b4 100644 --- a/django_netjsonconfig/tests/test_views.py +++ b/django_netjsonconfig/tests/test_views.py @@ -9,7 +9,10 @@ class TestViews(TestCase): """ tests for django_netjsonconfig.views """ - fixtures = ['test_users'] + def setUp(self): + User.objects.create_superuser(username='admin', + password='tester', + email='admin@admin.com') def test_schema_403(self): response = self.client.get(reverse('netjsonconfig:schema')) diff --git a/requirements.txt b/requirements.txt index ff0d647..c6eaa39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -django>=1.9,<1.10 +django>=1.10,<1.11 django-model-utils jsonfield six netjsonconfig>=0.4.2,<0.5.0 -django-sortedm2m>=1.1.0,<1.3 -django-reversion>=1.10.0,<1.11.0 +django-sortedm2m>=1.3.2,<1.4 +django-reversion>=2.0.6,<2.1