1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Improve test; downcase instance variable

This commit is contained in:
John Lane
2020-02-10 17:14:57 +00:00
parent 2d09a01c74
commit 3d871a5bad
2 changed files with 4 additions and 3 deletions

View File

@@ -37,12 +37,12 @@ class DnsimpleClient(object):
sess.headers.update({'Authorization': 'Bearer {}'.format(token)})
self._sess = sess
if sandbox:
self.BASE = 'https://api.sandbox.dnsimple.com/v2/'
self.base = 'https://api.sandbox.dnsimple.com/v2/'
else:
self.BASE = 'https://api.dnsimple.com/v2/'
self.base = 'https://api.dnsimple.com/v2/'
def _request(self, method, path, params=None, data=None):
url = '{}{}{}'.format(self.BASE, self.account, path)
url = '{}{}{}'.format(self.base, self.account, path)
resp = self._sess.request(method, url, params=params, json=data)
if resp.status_code == 401:
raise DnsimpleClientUnauthorized()