Clean imports in code
In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. [1]: "Do not import objects, only modules". [1] https://docs.openstack.org/hacking/0.10.3/ Change-Id: I90ae12639be39b72bac7907cbd71182f44dae02d
This commit is contained in:
@@ -18,7 +18,7 @@ import copy
|
||||
import json
|
||||
import sys
|
||||
|
||||
from six import StringIO
|
||||
import six
|
||||
|
||||
import mock
|
||||
|
||||
@@ -160,7 +160,7 @@ class TestCLIActionExecutions(base.BaseCommandTest):
|
||||
|
||||
# Redirect the stderr so it doesn't show during tox
|
||||
_stderr = sys.stderr
|
||||
sys.stderr = StringIO()
|
||||
sys.stderr = six.StringIO()
|
||||
|
||||
for state in states:
|
||||
self.assertRaises(
|
||||
|
@@ -21,7 +21,6 @@ import mock
|
||||
|
||||
from mistralclient.api.v2 import tasks
|
||||
from mistralclient.commands.v2 import tasks as task_cmd
|
||||
from mistralclient.commands.v2.tasks import TaskFormatter
|
||||
from mistralclient.tests.unit import base
|
||||
|
||||
TASK_DICT = {
|
||||
@@ -62,7 +61,7 @@ class TestCLITasksV2(base.BaseCommandTest):
|
||||
self.assertEqual([EXPECTED_TASK_RESULT], result[1])
|
||||
self.assertEqual(
|
||||
self.client.tasks.list.call_args[1]["fields"],
|
||||
TaskFormatter.COLUMN_FIELD_NAMES
|
||||
task_cmd.TaskFormatter.COLUMN_FIELD_NAMES
|
||||
)
|
||||
|
||||
def test_list_with_workflow_execution(self):
|
||||
|
Reference in New Issue
Block a user