misc: pylint various fix (#52630)

This commit is contained in:
Lauréline Guérin 2021-04-02 15:34:14 +02:00
parent b45ff4a9b9
commit f79705fa5e
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
3 changed files with 12 additions and 5 deletions

View File

@ -8333,8 +8333,6 @@ def test_form_comment_is_hidden_attribute(pub):
@pytest.fixture
def create_formdata(pub):
pub = pub
FormDef.wipe()
data = [

View File

@ -236,7 +236,12 @@ def test_file_field_migration(pub):
]
formdef.fields[0].__dict__['file_type'] = [
'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',
(
'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'
),
]
formdef.fields[1].__dict__['file_type'] = ['image/*']
formdef.store()
@ -246,7 +251,12 @@ def test_file_field_migration(pub):
assert formdef.fields[0].document_type['id'] == '_legacy'
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',
(
'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'
),
]
assert formdef.fields[1].document_type['label'] == 'Image files'
assert formdef.fields[0].document_type['label'] == 'Image files, Documents'

View File

@ -36,7 +36,6 @@ HOBO_JSON = {
'title': 'Authentic',
'base_url': 'http://authentic.example.net/',
'id': 3,
'secret_key': '_b82$d)(xcw$dl@ieis@jhmrmbbeb4$=%lrpi*4p&b))*a*=5!',
'slug': 'authentic',
'secret_key': '12345',
},