ovh: use BaseResource.requests instead of requests (#23677)

This commit is contained in:
Thomas NOËL 2018-05-11 10:40:07 +02:00
parent bfca4a4c1a
commit 8a3268bf9e
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class OVHSMSGateway(BaseResource, SMSGatewayMixin):
if not kwargs['stop']:
params.update({'noStop': 1})
try:
response = requests.post(self.URL, data=params)
response = self.requests.post(self.URL, data=params)
except requests.RequestException as e:
raise APIError('OVH error: POST failed, %s' % e)
else:

View File

@ -37,7 +37,7 @@ def mock_url(url, response):
@httmock.urlmatch(netloc=parsed.netloc, path=parsed.path)
def mocked(url, request):
return response
return httmock.response(200, response, request=request)
return httmock.HTTMock(mocked)