Updates tests
This commit is contained in:
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "test"]
|
||||
path = test
|
||||
[submodule "tests/data"]
|
||||
path = tests/data
|
||||
url = https://github.com/HASecuritySolutions/VulnWhisperer-tests
|
||||
|
@ -37,10 +37,13 @@ def main():
|
||||
help='The NESSUS username', type=lambda x: x.strip())
|
||||
parser.add_argument('-p', '--password', dest='password', required=False, default=None,
|
||||
help='The NESSUS password', type=lambda x: x.strip())
|
||||
parser.add_argument('-F', '--fancy', action='store_true', help='Enable colourful logging output')
|
||||
parser.add_argument('-d', '--debug', action='store_true', help='Enable debugging messages')
|
||||
parser.add_argument('--mock', action='store_true', help='Enable mocked API responses')
|
||||
parser.add_argument('--mock_dir', dest='mock_dir', required=False, default='test',
|
||||
parser.add_argument('-F', '--fancy', action='store_true',
|
||||
help='Enable colourful logging output')
|
||||
parser.add_argument('-d', '--debug', action='store_true',
|
||||
help='Enable debugging messages')
|
||||
parser.add_argument('--mock', action='store_true',
|
||||
help='Enable mocked API responses')
|
||||
parser.add_argument('--mock_dir', dest='mock_dir', required=False, default=None,
|
||||
help='Path of test directory')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
1
test
1
test
Submodule test deleted from 606b8bcbe3
@ -6,12 +6,12 @@ import httpretty
|
||||
class mockAPI(object):
|
||||
def __init__(self, mock_dir=None, debug=False):
|
||||
self.mock_dir = mock_dir
|
||||
|
||||
if not self.mock_dir:
|
||||
# Try to guess the mock_dir if python setup.py develop was used
|
||||
self.mock_dir = '/'.join(__file__.split('/')[:-3]) + '/test'
|
||||
self.mock_dir = '/'.join(__file__.split('/')[:-3]) + '/tests/data'
|
||||
|
||||
self.logger = logging.getLogger('mockAPI')
|
||||
|
||||
if debug:
|
||||
self.logger.setLevel(logging.DEBUG)
|
||||
|
||||
|
Reference in New Issue
Block a user