Exemple #1
0
 def test_language_list_index(self):
     languages = language_list(['fr', 'en-US', 'en-GB'])
     self.assertTrue(languages.index(Language('fr')) == 0)
     self.assertTrue(languages.index(Language('en-US')) == 1)
     self.assertTrue(languages.index(Language('en-GB')) == 2)
     self.assertTrue(languages.index(Language('fr-BE')) == 0)
Exemple #2
0
 def test_language_list_index(self):
     languages = language_list(['fr', 'en-US', 'en-GB'])
     self.assertTrue(languages.index(Language('fr')) == 0)
     self.assertTrue(languages.index(Language('en-US')) == 1)
     self.assertTrue(languages.index(Language('en-GB')) == 2)
     self.assertTrue(languages.index(Language('fr-BE')) == 0)
Exemple #3
0
 def test_language_list_contains(self):
     languages = language_list(['fr', 'en-US', 'en-GB'])
     self.assertTrue(Language('fr') in languages)
     self.assertTrue(Language('en-US') in languages)
     self.assertTrue(Language('en') not in languages)
     self.assertTrue(Language('fr-BE') in languages)
Exemple #4
0
 def test_language_list_contains(self):
     languages = language_list(['fr', 'en-US', 'en-GB'])
     self.assertTrue(Language('fr') in languages)
     self.assertTrue(Language('en-US') in languages)
     self.assertTrue(Language('en') not in languages)
     self.assertTrue(Language('fr-BE') in languages)