Projet

Général

Profil

0017-misc-pylint-various-fix-52630.patch

Lauréline Guérin, 02 avril 2021 17:21

Télécharger (3,21 ko)

Voir les différences:

Subject: [PATCH 17/18] misc: pylint various fix (#52630)

 tests/form_pages/test_all.py |  2 --
 tests/test_formdef.py        | 14 ++++++++++++--
 tests/test_hobo.py           |  1 -
 3 files changed, 12 insertions(+), 5 deletions(-)
tests/form_pages/test_all.py
8333 8333

  
8334 8334
@pytest.fixture
8335 8335
def create_formdata(pub):
8336
    pub = pub
8337

  
8338 8336
    FormDef.wipe()
8339 8337

  
8340 8338
    data = [
tests/test_formdef.py
236 236
    ]
237 237
    formdef.fields[0].__dict__['file_type'] = [
238 238
        'image/*',
239
        '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',
239
        (
240
            'application/pdf,application/vnd.oasis.opendocument.text,application/msword,'
241
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document,'
242
            'application/vnd.oasis.opendocument.spreadsheet,application/vnd.ms-excel,'
243
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
244
        ),
240 245
    ]
241 246
    formdef.fields[1].__dict__['file_type'] = ['image/*']
242 247
    formdef.store()
......
246 251
    assert formdef.fields[0].document_type['id'] == '_legacy'
247 252
    assert formdef.fields[0].document_type['mimetypes'] == [
248 253
        'image/*',
249
        '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',
254
        (
255
            'application/pdf,application/vnd.oasis.opendocument.text,application/msword,'
256
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document,'
257
            'application/vnd.oasis.opendocument.spreadsheet,application/vnd.ms-excel,'
258
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
259
        ),
250 260
    ]
251 261
    assert formdef.fields[1].document_type['label'] == 'Image files'
252 262
    assert formdef.fields[0].document_type['label'] == 'Image files, Documents'
tests/test_hobo.py
36 36
            'title': 'Authentic',
37 37
            'base_url': 'http://authentic.example.net/',
38 38
            'id': 3,
39
            'secret_key': '_b82$d)(xcw$dl@ieis@jhmrmbbeb4$=%lrpi*4p&b))*a*=5!',
40 39
            'slug': 'authentic',
41 40
            'secret_key': '12345',
42 41
        },
43
-