FIX monasca_setup unit test

- Add monasca_setup to the target of flake8
- Add coverage for monasca_setup
- Fix code style of monasca_setup with flake8

Change-Id: I67ac65e95289e9cb5c8e3cb7655d416c69c2ec05
This commit is contained in:
Koji Nakazono 2017-05-31 09:15:16 +09:00
parent d2387eaa46
commit 43028beb13
3 changed files with 5 additions and 2 deletions

View File

@ -3,8 +3,8 @@
import logging import logging
from os import path from os import path
import subprocess as sp
import re import re
import subprocess as sp
from subprocess import CalledProcessError from subprocess import CalledProcessError
from subprocess import STDOUT from subprocess import STDOUT

View File

@ -91,7 +91,7 @@ class Ovs(detection.Plugin):
'not installed.')) 'not installed.'))
else: else:
log.info("\tUsing neutron configuration file {0}".format( log.info("\tUsing neutron configuration file {0}".format(
neutron_conf)) neutron_conf))
self.neutron_conf = neutron_conf self.neutron_conf = neutron_conf
def _is_neutron_conf_valid(self, conf_file): def _is_neutron_conf_valid(self, conf_file):

View File

@ -38,6 +38,8 @@ commands =
coverage erase coverage erase
python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_agent python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_agent
coverage report coverage report
python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_setup
coverage report
[testenv:bandit] [testenv:bandit]
commands = commands =
@ -65,6 +67,7 @@ commands =
[testenv:flake8] [testenv:flake8]
commands = commands =
flake8 monasca_agent flake8 monasca_agent
flake8 monasca_setup
flake8 tests flake8 tests
[testenv:pep8] [testenv:pep8]