...
 
Commits (2)
...@@ -4,3 +4,13 @@ ...@@ -4,3 +4,13 @@
.__afs* .__afs*
.README.md.html .README.md.html
.idea .idea
tags
tags.lock
tags.temp
.mypy_cache/
.tox/
.venv/
cscope.files
build/
dist/
django_tuc2014.egg-info/
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.test import Client, TestCase from django.test import Client, TestCase
from django.urls import reverse
from django.utils import six from django.utils import six
class Tuc2014TestCase(TestCase): class Tuc2014TestCase(TestCase):
CONTENT_BLOCK = '<div id="id_tests_block_content">CONTENT_BLOCK</div>' CONTENT_BLOCK = '<div id="id_tests_block_content">CONTENT_BLOCK</div>'
def setUp(self): def setUp(self):
self.client = Client() self.client = Client()
def test_index(self): def test_index(self):
response = self.client.get('/') response = self.client.get('/')
self.assertEquals(response.status_code, 200) self.assertEquals(response.status_code, 200)
...@@ -24,3 +25,9 @@ class Tuc2014TestCase(TestCase): ...@@ -24,3 +25,9 @@ class Tuc2014TestCase(TestCase):
self.client.login(username="test", password="test") self.client.login(username="test", password="test")
response = self.client.get('/admin/') response = self.client.get('/admin/')
self.assertEquals(response.status_code, 200) 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 ...@@ -5,7 +5,8 @@ from django.conf.urls import include, url
from .views import change_language from .views import change_language
app_name = 'tuc2014'
urlpatterns = [ 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') url(r'^$', change_language, name='change_language')
] ]
\ No newline at end of file