summaryrefslogtreecommitdiff
path: root/tests/i18n
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-05-12 15:03:38 -0400
committerGitHub <noreply@github.com>2018-05-12 15:03:38 -0400
commit1e0cbc72e5bcb1c1e235b3cd82a92800ed3c84b8 (patch)
treeca7ed11aa734fd9e7288f2b1c91f45d038f4514c /tests/i18n
parent35319bf12ccefe1911588493484160aa49208f89 (diff)
downloaddjango-1e0cbc72e5bcb1c1e235b3cd82a92800ed3c84b8.tar.gz
Moved to_language() to django.utils.translation.
Follow up to 1b7d524cfa7b7834af26c99407af66be6813938d.
Diffstat (limited to 'tests/i18n')
-rw-r--r--tests/i18n/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
index 2ab8dd73e2..3837ec9132 100644
--- a/tests/i18n/tests.py
+++ b/tests/i18n/tests.py
@@ -30,8 +30,8 @@ from django.utils.translation import (
LANGUAGE_SESSION_KEY, activate, check_for_language, deactivate,
get_language, get_language_bidi, get_language_from_request,
get_language_info, gettext, gettext_lazy, ngettext, ngettext_lazy,
- npgettext, npgettext_lazy, pgettext, to_locale, trans_null, trans_real,
- ugettext, ugettext_lazy, ungettext, ungettext_lazy,
+ npgettext, npgettext_lazy, pgettext, to_language, to_locale, trans_null,
+ trans_real, ugettext, ugettext_lazy, ungettext, ungettext_lazy,
)
from .forms import CompanyForm, I18nForm, SelectDateForm
@@ -288,8 +288,8 @@ class TranslationTests(SimpleTestCase):
self.assertEqual(to_locale(lang), locale)
def test_to_language(self):
- self.assertEqual(trans_real.to_language('en_US'), 'en-us')
- self.assertEqual(trans_real.to_language('sr_Lat'), 'sr-lat')
+ self.assertEqual(to_language('en_US'), 'en-us')
+ self.assertEqual(to_language('sr_Lat'), 'sr-lat')
def test_language_bidi(self):
self.assertIs(get_language_bidi(), False)