[Merge] - Fixing lint
This commit is contained in:
commit
bc68a373aa
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ virtualenv:
|
|||||||
netaddr jinja2
|
netaddr jinja2
|
||||||
|
|
||||||
lint: virtualenv
|
lint: virtualenv
|
||||||
.venv/bin/flake8 --exclude hooks/charmhelpers hooks unit_tests tests
|
.venv/bin/flake8 --exclude hooks/charmhelpers hooks unit_tests tests --ignore E402
|
||||||
@charm proof
|
@charm proof
|
||||||
|
|
||||||
unit_test: virtualenv
|
unit_test: virtualenv
|
||||||
|
@ -327,8 +327,7 @@ def post_pg_license():
|
|||||||
'plumgrid:plumgrid',
|
'plumgrid:plumgrid',
|
||||||
LICENSE_POST_PATH,
|
LICENSE_POST_PATH,
|
||||||
'-d',
|
'-d',
|
||||||
json.dumps(license)
|
json.dumps(license)]
|
||||||
]
|
|
||||||
licence_get_cmd = [PG_CURL, '-u', 'plumgrid:plumgrid', LICENSE_GET_PATH]
|
licence_get_cmd = [PG_CURL, '-u', 'plumgrid:plumgrid', LICENSE_GET_PATH]
|
||||||
try:
|
try:
|
||||||
old_license = subprocess.check_output(licence_get_cmd)
|
old_license = subprocess.check_output(licence_get_cmd)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
from mock import MagicMock, patch, call
|
from mock import MagicMock, patch, call
|
||||||
|
|
||||||
from test_utils import CharmTestCase
|
from test_utils import CharmTestCase
|
||||||
|
|
||||||
with patch('charmhelpers.core.hookenv.config') as config:
|
with patch('charmhelpers.core.hookenv.config') as config:
|
||||||
config.return_value = 'neutron'
|
config.return_value = 'neutron'
|
||||||
import pg_dir_utils as utils
|
import pg_dir_utils as utils
|
||||||
@ -9,6 +11,7 @@ _map = utils.restart_map
|
|||||||
|
|
||||||
utils.register_configs = MagicMock()
|
utils.register_configs = MagicMock()
|
||||||
utils.restart_map = MagicMock()
|
utils.restart_map = MagicMock()
|
||||||
|
|
||||||
import pg_dir_hooks as hooks
|
import pg_dir_hooks as hooks
|
||||||
|
|
||||||
utils.register_configs = _reg
|
utils.register_configs = _reg
|
||||||
|
Loading…
Reference in New Issue
Block a user