Send new requests to requests-queue

This commit is contained in:
richard-dds
2018-06-18 11:14:27 -04:00
parent b51955771f
commit 8b1410aed5
4 changed files with 28 additions and 7 deletions

View File

@@ -1,8 +1,10 @@
import tornado.gen
from tornado.httpclient import HTTPRequest, HTTPResponse
from atst.api_client import ApiClient
class MockApiClient(object):
class MockApiClient(ApiClient):
def __init__(self, service):
self.service = service
@@ -27,6 +29,8 @@ class MockApiClient(object):
return self._get_response('DELETE', path)
def _get_response(self, verb, path):
response = HTTPResponse(request=HTTPRequest(path, verb), code=200)
setattr(response, 'json', {})
return response
response = HTTPResponse(
request=HTTPRequest(path, verb),
code=200,
headers={'Content-Type': 'application-json'})
return self.adapt_response(response)