Fix lint in unit tests re: py3-first and py2 compat
Use six for now due to the transitional state of this charm from py2 to py3. Change-Id: I24d3cbd66964000600dbcb7849564bb53956fe5c
This commit is contained in:
parent
30166020fb
commit
8a1009137b
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=./unit_tests
|
||||
top_dir=./
|
@ -14,6 +14,8 @@
|
||||
|
||||
import json
|
||||
|
||||
from six.moves import reload_module
|
||||
|
||||
from mock import (
|
||||
patch,
|
||||
call
|
||||
@ -31,7 +33,7 @@ with patch('charmhelpers.contrib.hardening.harden.harden') as mock_dec:
|
||||
with patch('cinder_utils.restart_map') as restart_map:
|
||||
restart_map.return_value = RESTART_MAP
|
||||
import cinder_hooks as hooks
|
||||
reload(hooks)
|
||||
reload_module(hooks)
|
||||
|
||||
hooks.hooks._config_save = False
|
||||
import cinder_utils as utils
|
||||
|
Loading…
x
Reference in New Issue
Block a user