File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -91,19 +91,19 @@ def test_list_translations():
91
91
b = babel .Babel (app , default_locale = "de_DE" )
92
92
93
93
with app .app_context ():
94
- translations = b .list_translations ()
94
+ translations = sorted ( b .list_translations (), key = str )
95
95
assert len (translations ) == 3
96
96
assert str (translations [0 ]) == "de"
97
- assert str (translations [1 ]) == "ja "
98
- assert str (translations [2 ]) == "de_DE "
97
+ assert str (translations [1 ]) == "de_DE "
98
+ assert str (translations [2 ]) == "ja "
99
99
100
100
101
101
def test_list_translations_default_locale_exists ():
102
102
app = flask .Flask (__name__ )
103
103
b = babel .Babel (app , default_locale = "de" )
104
104
105
105
with app .app_context ():
106
- translations = b .list_translations ()
106
+ translations = sorted ( b .list_translations (), key = str )
107
107
assert len (translations ) == 2
108
108
assert str (translations [0 ]) == "de"
109
109
assert str (translations [1 ]) == "ja"
Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ def test_multiple_directories():
38
38
b .init_app (app )
39
39
40
40
with app .test_request_context ():
41
- translations = b .list_translations ()
41
+ translations = sorted ( b .list_translations (), key = str )
42
42
43
43
assert len (translations ) == 4
44
44
assert str (translations [0 ]) == "de"
45
- assert str (translations [1 ]) == "ja "
46
- assert str (translations [2 ]) == "de "
47
- assert str (translations [3 ]) == "de_DE "
45
+ assert str (translations [1 ]) == "de "
46
+ assert str (translations [2 ]) == "de_DE "
47
+ assert str (translations [3 ]) == "ja "
48
48
49
49
assert gettext ("Hello %(name)s!" , name = "Peter" ) == "Hallo Peter!"
50
50
You can’t perform that action at this time.
0 commit comments