File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,33 @@ def index():
173
173
c = app .test_client ()
174
174
rv = c .get ('/' )
175
175
lines = [x .strip () for x in rv .data .strip ().decode ('utf-8' ).splitlines ()]
176
- self .assert_equal (lines , [
176
+ sorted_by_str = [
177
+ '{' ,
178
+ '"values": {' ,
179
+ '"0": "foo",' ,
180
+ '"1": "foo",' ,
181
+ '"10": "foo",' ,
182
+ '"11": "foo",' ,
183
+ '"12": "foo",' ,
184
+ '"13": "foo",' ,
185
+ '"14": "foo",' ,
186
+ '"15": "foo",' ,
187
+ '"16": "foo",' ,
188
+ '"17": "foo",' ,
189
+ '"18": "foo",' ,
190
+ '"19": "foo",' ,
191
+ '"2": "foo",' ,
192
+ '"3": "foo",' ,
193
+ '"4": "foo",' ,
194
+ '"5": "foo",' ,
195
+ '"6": "foo",' ,
196
+ '"7": "foo",' ,
197
+ '"8": "foo",' ,
198
+ '"9": "foo"' ,
199
+ '}' ,
200
+ '}'
201
+ ]
202
+ sorted_by_int = [
177
203
'{' ,
178
204
'"values": {' ,
179
205
'"0": "foo",' ,
@@ -198,8 +224,12 @@ def index():
198
224
'"19": "foo"' ,
199
225
'}' ,
200
226
'}'
201
- ])
227
+ ]
202
228
229
+ try :
230
+ self .assert_equal (lines , sorted_by_int )
231
+ except AssertionError :
232
+ self .assert_equal (lines , sorted_by_str )
203
233
204
234
class SendfileTestCase (FlaskTestCase ):
205
235
You can’t perform that action at this time.
0 commit comments