Commit 1cf9f851 authored by Alexandre's avatar Alexandre
Browse files

Pass dot var to function

parent 5994f9d4
......@@ -181,18 +181,18 @@ class CustomException(Exception):
pass
def create_request(dot=False, **req_args):
def create_request(dot=dot, **req_args):
if dot:
request = RequestDoT(**req_args)
else:
request = RequestDoH(**req_args)
return request
def create_requests_list(**req_args):
def create_requests_list(dot=dot, **req_args):
requests = []
if dot:
requests.append(('Test 1', create_request(dot=True, **req_args)))
requests.append(('Test 2', create_request(dot=True, **req_args)))
requests.append(('Test 1', create_request(dot=dot, **req_args)))
requests.append(('Test 2', create_request(dot=dot, **req_args)))
else:
requests.append(('Test GET', create_request(**req_args), DOH_GET))
requests.append(('Test POST', create_request(**req_args), DOH_POST))
......@@ -751,4 +751,3 @@ else:
sys.exit(1)
else:
sys.exit(STATE_CRITICAL)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment