Projet

Général

Profil

0005-tests-ignore-order-in-document-type-label-after-migr.patch

Benjamin Dauvergne, 30 mars 2016 18:50

Télécharger (1,35 ko)

Voir les différences:

Subject: [PATCH 5/6] tests: ignore order in document type label after
 migration (#10477)

Label by itering a dictionnary so order is unpredictable.
 tests/test_formdef.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/test_formdef.py
169 169
        assert formdef.fields[0].document_type['id'] == '_legacy'
170 170
        assert formdef.fields[0].document_type['mimetypes'] == ['image/*', 'application/pdf,application/vnd.oasis.opendocument.text,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.oasis.opendocument.spreadsheet,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
171 171
        assert formdef.fields[1].document_type['label'] == 'Image files'
172
        assert formdef.fields[0].document_type['label'] == 'Image files, Documents'
172
        assert set(formdef.fields[0].document_type['label'].split(', ')) == set(['Image files',
173
                                                                                'Documents'])
173
-