You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/11/05 22:28:58 UTC
[libcloud] 05/05: Make sure we return correct response status code
on error.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 9b72e75ca1413cd7c37ad30b9f0ae20f6b06c7a8
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Thu Nov 5 23:25:07 2020 +0100
Make sure we return correct response status code on error.
---
libcloud/test/dns/test_digitalocean.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcloud/test/dns/test_digitalocean.py b/libcloud/test/dns/test_digitalocean.py
index 7e2c54e..7a4e7c1 100644
--- a/libcloud/test/dns/test_digitalocean.py
+++ b/libcloud/test/dns/test_digitalocean.py
@@ -122,7 +122,7 @@ class DigitalOceanDNSMockHttp(MockHttp):
def _v2_domains_CREATE(self, method, url, body, headers):
if body is None:
body = self.fixtures.load('_v2_domains_UNPROCESSABLE_ENTITY.json')
- return (self.response_map[self.type], body, {},
+ return (self.response_map['UNPROCESSABLE'], body, {},
httplib.responses[self.response_map['UNPROCESSABLE']])
body = self.fixtures.load('_v2_domains_CREATE.json')
return (self.response_map[self.type], body, {},
@@ -151,7 +151,7 @@ class DigitalOceanDNSMockHttp(MockHttp):
body, headers):
if body is None:
body = self.fixtures.load('_v2_domains_UNPROCESSABLE_ENTITY.json')
- return (self.response_map[self.type], body, {},
+ return (self.response_map['UNPROCESSABLE'], body, {},
httplib.responses[self.response_map['UNPROCESSABLE']])
body = self.fixtures.load('_v2_domains_testdomain_records_CREATE.json')
return (self.response_map[self.type], body, {},
@@ -174,7 +174,7 @@ class DigitalOceanDNSMockHttp(MockHttp):
self, method, url, body, headers):
if body is None:
body = self.fixtures.load('_v2_domains_UNPROCESSABLE_ENTITY.json')
- return (self.response_map[self.type], body, {},
+ return (self.response_map['UNPROCESSABLE'], body, {},
httplib.responses[self.response_map['UNPROCESSABLE']])
body = self.fixtures.load(
'_v2_domains_testdomain_records_1234564_UPDATE.json')