From c01d1c5f49c31dc15c51d80604b45556301a5058 Mon Sep 17 00:00:00 2001 From: "theodore.therone@gmail.com" Date: Thu, 9 Apr 2015 04:57:36 +0000 Subject: [PATCH] Django1.6 test fixes, adding Django1.8 to test suite --- .travis.yml | 3 +++ notifications/tests/tests.py | 2 +- notifications/tests/urls.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7211e57..c28c526 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ python: env: - DJANGO=1.6 - DJANGO=1.7 + - DJANGO=1.8 install: # command to install dependencies - "pip install coveralls" @@ -20,5 +21,7 @@ matrix: exclude: - python: "2.6" env: DJANGO=1.7 + - python: "2.6" + env: DJANGO=1.8 after_success: - coveralls diff --git a/notifications/tests/tests.py b/notifications/tests/tests.py index 0cee47f..4ac8275 100644 --- a/notifications/tests/tests.py +++ b/notifications/tests/tests.py @@ -97,7 +97,7 @@ class NotificationTestPages(TestCase): def login(self,username,password): self.logout() - response = self.client.post(reverse('admin:login'), {'username': username, 'password': password}) + response = self.client.post(reverse('login'), {'username': username, 'password': password}) self.assertEqual(response.status_code,302) return response diff --git a/notifications/tests/urls.py b/notifications/tests/urls.py index bf36e77..fa85cd3 100644 --- a/notifications/tests/urls.py +++ b/notifications/tests/urls.py @@ -6,6 +6,7 @@ from django.contrib import admin import notifications urlpatterns = patterns('', + url(r'^login/$', 'django.contrib.auth.views.login', name='login'), # needed for Django 1.6 tests url(r'^admin/', include(admin.site.urls)), url(r'^', include(notifications.urls)), ) \ No newline at end of file