trivial: fix disallowed-name pylint warning (#52732)
This commit is contained in:
parent
d67c024f15
commit
b23b21ee31
|
@ -14,7 +14,6 @@ disable=
|
|||
consider-using-set-comprehension,
|
||||
cyclic-import,
|
||||
deprecated-module,
|
||||
disallowed-name,
|
||||
duplicate-code,
|
||||
fixme,
|
||||
global-variable-undefined,
|
||||
|
|
|
@ -424,7 +424,7 @@ def test_shell():
|
|||
|
||||
class TestAfterJob(AfterJob):
|
||||
def execute(self):
|
||||
self.foo = WorkflowStatusItem().compute('{{ global_title|default:"FAIL" }}')
|
||||
self.test_result = WorkflowStatusItem().compute('{{ global_title|default:"FAIL" }}')
|
||||
self.l10n_month = WorkflowStatusItem().compute('{{ "10/10/2010"|date:"F" }}')
|
||||
|
||||
|
||||
|
@ -446,7 +446,7 @@ def test_runjob(pub):
|
|||
assert AfterJob.get(job.id).status == 'registered'
|
||||
call_command('runjob', '--domain=example.net', '--job-id=%s' % job.id)
|
||||
assert AfterJob.get(job.id).status == 'completed'
|
||||
assert AfterJob.get(job.id).foo == 'HELLO'
|
||||
assert AfterJob.get(job.id).test_result == 'HELLO'
|
||||
assert AfterJob.get(job.id).l10n_month == 'October'
|
||||
|
||||
pub.cfg['language'] = {'language': 'fr'}
|
||||
|
|
|
@ -346,18 +346,18 @@ def test_select_criteria_ilike():
|
|||
for x in range(50):
|
||||
test = Foobar()
|
||||
if x < 20:
|
||||
test.foo = 'foo'
|
||||
test.var = 'foo'
|
||||
else:
|
||||
test.foo = 'bar'
|
||||
test.var = 'bar'
|
||||
test.store()
|
||||
|
||||
test.foo = None # makes sure it doesn't break on None
|
||||
test.var = None # makes sure it doesn't break on None
|
||||
test.store()
|
||||
|
||||
assert len(Foobar.select()) == 50
|
||||
|
||||
assert [int(x.id) for x in Foobar.select([st.ILike('foo', 'bar')], order_by='id')] == list(range(21, 50))
|
||||
assert [int(x.id) for x in Foobar.select([st.ILike('foo', 'BAR')], order_by='id')] == list(range(21, 50))
|
||||
assert [int(x.id) for x in Foobar.select([st.ILike('var', 'bar')], order_by='id')] == list(range(21, 50))
|
||||
assert [int(x.id) for x in Foobar.select([st.ILike('var', 'BAR')], order_by='id')] == list(range(21, 50))
|
||||
|
||||
|
||||
def test_store_async():
|
||||
|
|
Loading…
Reference in New Issue