Updated clam rest service to support additional abirt argument

This commit is contained in:
Oliver Sterzel 2016-06-26 22:55:55 +01:00
parent 138fc10e44
commit 6589980fe4
3 changed files with 15 additions and 7 deletions

View file

@ -0,0 +1,7 @@
import os
def before_all(context):
if os.environ.get('CLAMREST_HOST'):
context.clamrest = "{}".format(os.environ.get('CLAMREST_HOST'))
else:
context.clamrest = "http://127.0.0.1:9000"

View file

@ -9,7 +9,7 @@ def step_imp(context, contents):
@when('I scan the file for a virus')
def step_impl(context):
files = { 'file': context.file_contents }
url = "http://127.0.0.1:9000"
url = context.clamrest
r = requests.post(url + "/scan", files=files)
context.result = r