[devtools] Sort _cw_fields in fake_form
Try to generate a predictable string, to help testing with PYTHONHASHSEED=random.
--- a/devtools/test/unittest_testlib.py Fri Jun 26 16:29:28 2015 +0200
+++ b/devtools/test/unittest_testlib.py Fri Jun 26 16:28:56 2015 +0200
@@ -42,7 +42,7 @@
'__maineid': 0,
'__type:0': 'Entity',
'_cw_entity_fields:0': '__type,field',
- '_cw_fields': 'file,encoding',
+ '_cw_fields': 'encoding,file',
'eid': [0],
'encoding': u'utf-8',
'field:0': 'value',
--- a/devtools/testlib.py Fri Jun 26 16:29:28 2015 +0200
+++ b/devtools/testlib.py Fri Jun 26 16:28:56 2015 +0200
@@ -724,7 +724,7 @@
if entity_fields:
form[eid_param('_cw_entity_fields', entity.eid)] = ','.join(entity_fields)
if fields:
- form['_cw_fields'] = ','.join(fields)
+ form['_cw_fields'] = ','.join(sorted(fields))
return form
@deprecated('[3.19] use .admin_request_from_url instead')