Esempio n. 1
0
 def test_english(self):
     data = [
         (u'en-US', u'English (US)'),
         (u'es', u'Spanish'),
         (u'gd', u'Gaelic (Scotland)'),
         (u'xx', u'Unknown')
     ]
     for name, expected in data:
         eq_(unicode(locale_name(name)), expected)
Esempio n. 2
0
 def test_native(self):
     data = [
         (u'en-US', u'English (US)'),
         (u'es', u'Espa\u00f1ol'),
         (u'gd', u'G\u00e0idhlig'),
         (u'xx', u'Unknown')
     ]
     for name, expected in data:
         eq_(unicode(locale_name(name, native=True)), expected)
Esempio n. 3
0
 def test_english(self):
     data = [(u'en-US', u'English (US)'), (u'es', u'Spanish'),
             (u'gd', u'Gaelic (Scotland)'), (u'xx', u'Unknown')]
     for name, expected in data:
         eq_(unicode(locale_name(name)), expected)
Esempio n. 4
0
 def test_english(self):
     eq_(locale_name('en-US'), u'English (US)')
     eq_(locale_name('es'), u'Spanish')
     eq_(locale_name('gd'), u'Gaelic (Scotland)')
Esempio n. 5
0
 def test_native(self):
     data = [(u'en-US', u'English (US)'), (u'es', u'Espa\u00f1ol'),
             (u'gd', u'G\u00e0idhlig'), (u'xx', u'Unknown')]
     for name, expected in data:
         eq_(unicode(locale_name(name, native=True)), expected)
Esempio n. 6
0
 def test_native(self):
     eq_(locale_name('en-US', native=True), u'English (US)')
     eq_(locale_name('es', native=True), u'Espa\u00f1ol')
     eq_(locale_name('gd', native=True), u'G\u00e0idhlig')
Esempio n. 7
0
 def test_english(self):
     data = [(u"en-US", u"English (US)"), (u"es", u"Spanish"), (u"gd", u"Gaelic (Scotland)"), (u"xx", u"Unknown")]
     for name, expected in data:
         assert unicode(locale_name(name)) == expected
Esempio n. 8
0
 def test_native(self):
     data = [(u"en-US", u"English (US)"), (u"es", u"Espa\u00f1ol"), (u"gd", u"G\u00e0idhlig"), (u"xx", u"Unknown")]
     for name, expected in data:
         assert unicode(locale_name(name, native=True)) == expected
Esempio n. 9
0
 def test_english(self):
     eq_(locale_name('en-US'), u'English (US)')
     eq_(locale_name('es'), u'Spanish')
     eq_(locale_name('gd'), u'Gaelic (Scotland)')
Esempio n. 10
0
 def test_native(self):
     eq_(locale_name('en-US', native=True), u'English (US)')
     eq_(locale_name('es', native=True), u'Espa\u00f1ol')
     eq_(locale_name('gd', native=True), u'G\u00e0idhlig')