Update hacking and fix warning
Change-Id: If1358bcfc3f914956f8917cbbcea894f6264febc
This commit is contained in:
parent
fd02f4c7f8
commit
1c3a3f2248
@ -103,4 +103,5 @@ class ActionContextSerializer(serialization.DictBasedSerializer):
|
|||||||
execution_ctx=ExecutionContext(**entity_dict['execution'])
|
execution_ctx=ExecutionContext(**entity_dict['execution'])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
serialization.register_serializer(ActionContext, ActionContextSerializer())
|
serialization.register_serializer(ActionContext, ActionContextSerializer())
|
||||||
|
@ -78,4 +78,5 @@ class ResultSerializer(serialization.DictBasedSerializer):
|
|||||||
entity_dict.get('cancel', False)
|
entity_dict.get('cancel', False)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
serialization.register_serializer(Result, ResultSerializer())
|
serialization.register_serializer(Result, ResultSerializer())
|
||||||
|
@ -15,28 +15,28 @@ from mistral_lib.tests import base as tests_base
|
|||||||
|
|
||||||
|
|
||||||
def _fake_context():
|
def _fake_context():
|
||||||
security_ctx = context.SecurityContext(
|
security_ctx = context.SecurityContext(
|
||||||
auth_uri='auth_uri',
|
auth_uri='auth_uri',
|
||||||
auth_cacert='auth_cacert',
|
auth_cacert='auth_cacert',
|
||||||
insecure='insecure',
|
insecure='insecure',
|
||||||
service_catalog='service_catalog',
|
service_catalog='service_catalog',
|
||||||
region_name='region_name',
|
region_name='region_name',
|
||||||
is_trust_scoped='is_trust_scoped',
|
is_trust_scoped='is_trust_scoped',
|
||||||
redelivered='redelivered',
|
redelivered='redelivered',
|
||||||
expires_at='expires_at',
|
expires_at='expires_at',
|
||||||
trust_id='trust_id',
|
trust_id='trust_id',
|
||||||
is_target='is_target',
|
is_target='is_target',
|
||||||
project_id='project_id')
|
project_id='project_id')
|
||||||
|
|
||||||
execution_ctx = context.ExecutionContext(
|
execution_ctx = context.ExecutionContext(
|
||||||
workflow_execution_id='workflow_execution_id',
|
workflow_execution_id='workflow_execution_id',
|
||||||
task_execution_id='task_execution_id',
|
task_execution_id='task_execution_id',
|
||||||
action_execution_id='action_execution_id',
|
action_execution_id='action_execution_id',
|
||||||
workflow_name='workflow_name',
|
workflow_name='workflow_name',
|
||||||
callback_url='callback_url')
|
callback_url='callback_url')
|
||||||
|
|
||||||
ctx = context.ActionContext(security_ctx, execution_ctx)
|
ctx = context.ActionContext(security_ctx, execution_ctx)
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
|
|
||||||
class TestActionsBase(tests_base.TestCase):
|
class TestActionsBase(tests_base.TestCase):
|
||||||
|
@ -248,7 +248,7 @@ def cut_dict(d, length=100):
|
|||||||
|
|
||||||
idx += 1
|
idx += 1
|
||||||
|
|
||||||
if 0 <= length <= len(res) and res[length - 1] is not '}':
|
if 0 <= length <= len(res) and res[length - 1] != '}':
|
||||||
res = res[:length - 3] + '...'
|
res = res[:length - 3] + '...'
|
||||||
|
|
||||||
return res
|
return res
|
||||||
@ -283,7 +283,7 @@ def cut_list(l, length=100):
|
|||||||
res += "'%s'" % s if is_str else s
|
res += "'%s'" % s if is_str else s
|
||||||
res += ', ' if idx < len(l) - 1 else ']'
|
res += ', ' if idx < len(l) - 1 else ']'
|
||||||
|
|
||||||
if 0 <= length <= len(res) and res[length - 1] is not ']':
|
if 0 <= length <= len(res) and res[length - 1] != ']':
|
||||||
res = res[:length - 3] + '...'
|
res = res[:length - 3] + '...'
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
hacking>=1.1.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
||||||
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
||||||
|
2
tox.ini
2
tox.ini
@ -58,7 +58,7 @@ commands = oslo_debug_helper -t mistral_lib/tests {posargs}
|
|||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = E123,E125
|
ignore = E123,E125,W504
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user