Updated clam rest service to support additional abirt argument
This commit is contained in:
parent
138fc10e44
commit
6589980fe4
3 changed files with 15 additions and 7 deletions
7
tests/features/environment.py
Normal file
7
tests/features/environment.py
Normal 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"
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue