misc: pylint fix misplaced-comparison-constant (#52630)

This commit is contained in:
Lauréline Guérin 2021-04-02 15:07:31 +02:00
parent 0ba07f8b12
commit c80d8dc224
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
2 changed files with 4 additions and 4 deletions

View File

@ -745,9 +745,9 @@ def test_formdata_generated_document_odt_to_pdf_download_push_to_portfolio(
resp = resp.form.submit('button_export_to')
assert http_post_request.call_count == 1
if locale.getpreferredencoding() == 'UTF-8':
assert "file 'template.pdf' pushed to portfolio of 'Foo Baré'" == caplog.records[-1].message
assert caplog.records[-1].message == "file 'template.pdf' pushed to portfolio of 'Foo Baré'"
else: # Python < 3.7
assert "file 'template.pdf' pushed to portfolio of 'Foo Bar\xe9'" == caplog.records[-1].message
assert caplog.records[-1].message == "file 'template.pdf' pushed to portfolio of 'Foo Bar\xe9'"
resp = resp.follow() # $form/$id/create_doc
resp = resp.follow() # $form/$id/create_doc/

View File

@ -193,8 +193,8 @@ def test_format_time():
def test_parse_isotime():
assert 1420107019 == parse_isotime('2015-01-01T10:10:19Z')
assert 1420107019 == parse_isotime('2015-01-01T10:10:19+00:00Z')
assert parse_isotime('2015-01-01T10:10:19Z') == 1420107019
assert parse_isotime('2015-01-01T10:10:19+00:00Z') == 1420107019
with pytest.raises(ValueError):
parse_isotime('2015-01-01T10:10:19')
with pytest.raises(ValueError):