0010-misc-pylint-fix-singleton-comparison-52630.patch
tests/backoffice_pages/test_all.py | ||
---|---|---|
832 | 832 |
create_environment(pub) |
833 | 833 |
app = login(get_app(pub)) |
834 | 834 |
resp = app.get('/backoffice/management/form-title/') |
835 |
assert resp.forms['listing-settings']['filter-status'].checked == True
|
|
835 |
assert resp.forms['listing-settings']['filter-status'].checked is True
|
|
836 | 836 |
resp.forms['listing-settings']['filter-status'].checked = False |
837 | 837 |
resp.forms['listing-settings']['filter-2'].checked = True |
838 | 838 |
resp = resp.forms['listing-settings'].submit() |
tests/form_pages/test_all.py | ||
---|---|---|
3359 | 3359 |
formdef.store() |
3360 | 3360 |
formdef.data_class().wipe() |
3361 | 3361 | |
3362 |
assert file_field.allow_portfolio_picking == True
|
|
3362 |
assert file_field.allow_portfolio_picking is True
|
|
3363 | 3363 | |
3364 | 3364 |
resp = get_app(pub).get('/test/') |
3365 | 3365 |
assert 'f0$file' in resp.text |
... | ... | |
3406 | 3406 |
formdef.store() |
3407 | 3407 |
formdef.data_class().wipe() |
3408 | 3408 | |
3409 |
assert file_field.allow_portfolio_picking == True
|
|
3409 |
assert file_field.allow_portfolio_picking is True
|
|
3410 | 3410 | |
3411 | 3411 |
resp = get_app(pub).get('/test/') |
3412 | 3412 |
assert 'f0$file' in resp.text |
tests/test_formdata.py | ||
---|---|---|
152 | 152 |
formdata.store() |
153 | 153 |
substvars = formdata.get_substitution_variables() |
154 | 154 |
assert substvars.get('form_status') == 'Just Submitted' |
155 |
assert substvars.get('form_status_is_endpoint') == False
|
|
155 |
assert substvars.get('form_status_is_endpoint') is False
|
|
156 | 156 |
assert substvars.get('form_receipt_date') |
157 | 157 |
assert substvars.get('form_receipt_time') |
158 | 158 |
assert substvars.get('form_receipt_datetime') |
tests/test_publisher.py | ||
---|---|---|
55 | 55 |
except Exception: |
56 | 56 |
exc_type, exc_value, tb = sys.exc_info() |
57 | 57 |
req.form = {'foo': 'bar'} |
58 |
assert pub.USE_LONG_TRACES == True # use long traces by default
|
|
58 |
assert pub.USE_LONG_TRACES is True # use long traces by default
|
|
59 | 59 |
s = pub._generate_plaintext_error(req, None, exc_type, exc_value, tb) |
60 | 60 |
assert re.findall('^foo.*bar', s, re.MULTILINE) |
61 | 61 |
assert re.findall('^SERVER_NAME.*www.example.net', s, re.MULTILINE) |
tests/test_workflow_import.py | ||
---|---|---|
430 | 430 |
wscall2 = wf2.possible_status[0].items[0] |
431 | 431 |
assert wscall2.url == 'http://test/' |
432 | 432 |
assert wscall2.varname == 'varname' |
433 |
assert wscall2.post == False
|
|
433 |
assert wscall2.post is False
|
|
434 | 434 |
assert wscall2.request_signature_key == 'key' |
435 | 435 |
assert wscall2.post_data == {'one': '1', 'two': '=2', 'good:name': 'ok'} |
436 | 436 |
assert wscall2.qs_data == {'one': '2', 'two': '=3', 'good:name': 'ok'} |
437 |
- |