Skip to content

Commit

Permalink
Merge pull request #34 from yamihalovna/upgrade_to_django_1_10
Browse files Browse the repository at this point in the history
Upgrade to django 1 10
  • Loading branch information
benbacardi committed Apr 19, 2017
2 parents ab52eae + 83e74f3 commit 92501f0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python
env:
- DJANGO_VERSION=">=1.8, < 1.9"
- DJANGO_VERSION=">=1.9, < 1.10"
- DJANGO_VERSION=">=1.10, < 1.11"
python:
- 2.7
- 3.5
Expand All @@ -27,5 +28,5 @@ deploy:
distributions: "bdist_wheel sdist"
on:
all_branches: true
condition: $DJANGO_VERSION = ">=1.9, < 1.10"
condition: $DJANGO_VERSION = ">=1.10, < 1.11"
repo: ocadotechnology/django-nuit
12 changes: 5 additions & 7 deletions nuit/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,29 +118,27 @@ def test_nuit_context_processor(self):
resulting_dict = nuit_context_processor(None)
expected_resulting_settings = self.sample_settings
expected_resulting_settings['NUIT_LOGIN_URL'] = '/accounts/login/'
expected_resulting_settings['NUIT_LOGOUT_URL'] = '/accounts/logout/'
expected_resulting_settings['NUIT_LOGOUT_URL'] = getattr(django.conf.settings, 'LOGOUT_URL', None)
self.assertEqual(resulting_dict, expected_resulting_settings)

class NuitHandlers(TestCase):
'''Tests Nuit's handlers'''
urls = 'nuit.tests.urls'

@override_settings(COMPRESS_OFFLINE=False)
@override_settings(COMPRESS_OFFLINE=False, ROOT_URLCONF='nuit.tests.urls')
def test_error_400(self):
response = self.client.get('/error400/')
self.assertEqual(response.status_code, 400)

@override_settings(COMPRESS_OFFLINE=False)
@override_settings(COMPRESS_OFFLINE=False, ROOT_URLCONF='nuit.tests.urls')
def test_error_403(self):
response = self.client.get('/error403/')
self.assertEqual(response.status_code, 403)

@override_settings(COMPRESS_OFFLINE=False)
@override_settings(COMPRESS_OFFLINE=False, ROOT_URLCONF='nuit.tests.urls')
def test_error_404(self):
response = self.client.get('/error404/')
self.assertEqual(response.status_code, 404)

@override_settings(COMPRESS_OFFLINE=False)
@override_settings(COMPRESS_OFFLINE=False, ROOT_URLCONF='nuit.tests.urls')
def test_error_500(self):
response = self.client.get('/error500/')
self.assertEqual(response.status_code, 500)
Expand Down
15 changes: 8 additions & 7 deletions nuit/tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'''Test URLs'''
from django.conf.urls import patterns
from django.conf.urls import url
from .. import handlers

urlpatterns = patterns('',
(r'^error400/$', 'nuit.handlers.handler400'),
(r'^error403/$', 'nuit.handlers.handler403'),
(r'^error404/$', 'nuit.handlers.handler404'),
(r'^error500/$', 'nuit.handlers.handler500'),
)
urlpatterns = [
url(r'^error400/$', handlers.handler400),
url(r'^error403/$', handlers.handler403),
url(r'^error404/$', handlers.handler404),
url(r'^error500/$', handlers.handler500),
]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'django-foundation-statics >= 5.4.7-2',
'django-jquery',
'django-foundation-icons>=3.1',
'django < 1.10',
'django < 1.11',
'django-autoconfig',
'django-bourbon',
'django-pipeline >= 1.6.0',
Expand Down

0 comments on commit 92501f0

Please sign in to comment.