Permalink
Showing with 2 additions and 4 deletions.
  1. +2 −4 tests/regressiontests/i18n/tests.py
View
6 tests/regressiontests/i18n/tests.py
@@ -957,8 +957,7 @@ def test_localized_language_info(self):
self.assertEqual(li['bidi'], False)
def test_unknown_language_code(self):
- with self.assertRaisesRegexp(KeyError, "Unknown language code xx."):
- get_language_info('xx')
+ six.assertRaisesRegex(self, KeyError, "Unknown language code '?xx'?.", get_language_info, 'xx-xx')
def test_unknown_only_country_code(self):
li = get_language_info('de-xx')
@@ -968,8 +967,7 @@ def test_unknown_only_country_code(self):
self.assertEqual(li['bidi'], False)
def test_unknown_language_code_and_country_code(self):
- with self.assertRaisesRegexp(KeyError, "Unknown language code xx-xx and xx."):
- get_language_info('xx-xx')
+ six.assertRaisesRegex(self, KeyError, "Unknown language code '?xx-xx'? and '?xx'?.", get_language_info, 'xx-xx')
class MultipleLocaleActivationTests(TestCase):

0 comments on commit bfd4a71

Please sign in to comment.