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
This commit is contained in:
parent
196a7a5457
commit
17d2d75abb
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user