mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Make use of new translation and settings context manager in the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -4,7 +4,7 @@ from django.test import TestCase
|
||||
from django.utils.text import *
|
||||
from django.utils.http import urlquote, urlquote_plus, cookie_date, http_date
|
||||
from django.utils.encoding import iri_to_uri
|
||||
from django.utils.translation import activate, deactivate
|
||||
from django.utils.translation import override
|
||||
|
||||
class TextTests(TestCase):
|
||||
"""
|
||||
@@ -17,9 +17,8 @@ class TextTests(TestCase):
|
||||
self.assertEqual(get_text_list(['a', 'b'], 'and'), u'a and b')
|
||||
self.assertEqual(get_text_list(['a']), u'a')
|
||||
self.assertEqual(get_text_list([]), u'')
|
||||
activate('ar')
|
||||
self.assertEqual(get_text_list(['a', 'b', 'c']), u"a، b أو c")
|
||||
deactivate()
|
||||
with override('ar'):
|
||||
self.assertEqual(get_text_list(['a', 'b', 'c']), u"a، b أو c")
|
||||
|
||||
def test_smart_split(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user