From 17d2d75abb11d42c31a3f2a708f3675754d30819 Mon Sep 17 00:00:00 2001 From: Nguyen Hung Phuong Date: Mon, 15 Aug 2016 13:40:56 +0700 Subject: [PATCH] Clean imports in code In some part in the code we import objects. In the Openstack style guidelines they recommand to import only modules. We need to fix that. Change-Id: I268c5045f00d25b4dfbf77c1f599c7baca8373ed Partial-Bug:1543101 --- watcher/tests/objects/test_strategy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/watcher/tests/objects/test_strategy.py b/watcher/tests/objects/test_strategy.py index be3bbbc77..4ca4439fe 100644 --- a/watcher/tests/objects/test_strategy.py +++ b/watcher/tests/objects/test_strategy.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. + import mock -from testtools.matchers import HasLength +from testtools import matchers from watcher.common import exception from watcher import objects @@ -57,7 +58,7 @@ class TestStrategyObject(base.DbTestCase): mock_get_list.return_value = [self.fake_strategy] strategies = objects.Strategy.list(self.context) self.assertEqual(1, mock_get_list.call_count, 1) - self.assertThat(strategies, HasLength(1)) + self.assertThat(strategies, matchers.HasLength(1)) self.assertIsInstance(strategies[0], objects.Strategy) self.assertEqual(self.context, strategies[0]._context)