misc: pylint fix singleton-comparison (#52630)

This commit is contained in:
Lauréline Guérin 2021-04-02 14:34:49 +02:00
parent 5253275e37
commit 43807dadcd
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
5 changed files with 6 additions and 6 deletions

View File

@ -832,7 +832,7 @@ def test_backoffice_filter(pub):
create_environment(pub)
app = login(get_app(pub))
resp = app.get('/backoffice/management/form-title/')
assert resp.forms['listing-settings']['filter-status'].checked == True
assert resp.forms['listing-settings']['filter-status'].checked is True
resp.forms['listing-settings']['filter-status'].checked = False
resp.forms['listing-settings']['filter-2'].checked = True
resp = resp.forms['listing-settings'].submit()

View File

@ -3359,7 +3359,7 @@ def test_form_file_field_with_fargo(pub, fargo_url):
formdef.store()
formdef.data_class().wipe()
assert file_field.allow_portfolio_picking == True
assert file_field.allow_portfolio_picking is True
resp = get_app(pub).get('/test/')
assert 'f0$file' in resp.text
@ -3406,7 +3406,7 @@ def test_form_file_field_without_fargo(pub):
formdef.store()
formdef.data_class().wipe()
assert file_field.allow_portfolio_picking == True
assert file_field.allow_portfolio_picking is True
resp = get_app(pub).get('/test/')
assert 'f0$file' in resp.text

View File

@ -152,7 +152,7 @@ def test_just_created(pub):
formdata.store()
substvars = formdata.get_substitution_variables()
assert substvars.get('form_status') == 'Just Submitted'
assert substvars.get('form_status_is_endpoint') == False
assert substvars.get('form_status_is_endpoint') is False
assert substvars.get('form_receipt_date')
assert substvars.get('form_receipt_time')
assert substvars.get('form_receipt_datetime')

View File

@ -55,7 +55,7 @@ def test_plaintext_error():
except Exception:
exc_type, exc_value, tb = sys.exc_info()
req.form = {'foo': 'bar'}
assert pub.USE_LONG_TRACES == True # use long traces by default
assert pub.USE_LONG_TRACES is True # use long traces by default
s = pub._generate_plaintext_error(req, None, exc_type, exc_value, tb)
assert re.findall('^foo.*bar', s, re.MULTILINE)
assert re.findall('^SERVER_NAME.*www.example.net', s, re.MULTILINE)

View File

@ -430,7 +430,7 @@ def test_wscall_action(pub):
wscall2 = wf2.possible_status[0].items[0]
assert wscall2.url == 'http://test/'
assert wscall2.varname == 'varname'
assert wscall2.post == False
assert wscall2.post is False
assert wscall2.request_signature_key == 'key'
assert wscall2.post_data == {'one': '1', 'two': '=2', 'good:name': 'ok'}
assert wscall2.qs_data == {'one': '2', 'two': '=3', 'good:name': 'ok'}