Add importing modules instead of classes
This patch removes import of classes and replaces them with import of modules. Change-Id: Id2502cf96ac7227cf1036cd54a74f3d7acd83479 Closes-Bug: #1594434
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from testtools.matchers import HasLength
|
||||
from testtools import matchers
|
||||
|
||||
from watcher.common import exception
|
||||
# from watcher.common import utils as w_utils
|
||||
@@ -58,7 +58,7 @@ class TestActionPlanObject(base.DbTestCase):
|
||||
mock_get_list.return_value = [self.fake_action_plan]
|
||||
action_plans = objects.ActionPlan.list(self.context)
|
||||
self.assertEqual(1, mock_get_list.call_count)
|
||||
self.assertThat(action_plans, HasLength(1))
|
||||
self.assertThat(action_plans, matchers.HasLength(1))
|
||||
self.assertIsInstance(action_plans[0], objects.ActionPlan)
|
||||
self.assertEqual(self.context, action_plans[0]._context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user