Commit 8bac1d3b authored by Daniel Klaffenbach's avatar Daniel Klaffenbach 🐍

Merge branch 'fix-for-django2' into 'master'

tuc2014: Fix ImproperlyConfigured exception in when using Django 2.x

See merge request !4
parents fd9afec5 9d01bffc
Pipeline #26135 passed with stage
in 12 seconds
......@@ -4,3 +4,13 @@
......@@ -2,15 +2,16 @@
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.test import Client, TestCase
from django.urls import reverse
from django.utils import six
class Tuc2014TestCase(TestCase):
CONTENT_BLOCK = '<div id="id_tests_block_content">CONTENT_BLOCK</div>'
def setUp(self):
self.client = Client()
def test_index(self):
response = self.client.get('/')
self.assertEquals(response.status_code, 200)
......@@ -24,3 +25,9 @@ class Tuc2014TestCase(TestCase):
self.client.login(username="test", password="test")
response = self.client.get('/admin/')
self.assertEquals(response.status_code, 200)
def test_urlconf_i18n(self):
reverse('djangoi18n:set_language', 'tuc2014.urls')
def test_urlconf_tuc2014(self):
reverse('change_language', 'tuc2014.urls')
......@@ -5,7 +5,8 @@ from django.conf.urls import include, url
from .views import change_language
app_name = 'tuc2014'
urlpatterns = [
url(r'^i18n/', include('django.conf.urls.i18n', namespace='djangoi18n')),
url(r'^i18n/', include(('django.conf.urls.i18n', 'djangoi18n'), namespace='djangoi18n')),
url(r'^$', change_language, name='change_language')
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment