diff --git a/README.md b/README.md index 3c9bec021..4fd42cc38 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ The current supported providers are: - EasyDNS ([docs](http://docs.sandbox.rest.easydns.net/)) - NS1 ([docs](https://ns1.com/api/)) - PointHQ ([docs](https://pointhq.com/api/docs)) +- Rage4 ([docs](https://gbshouse.uservoice.com/knowledgebase/articles/109834-rage4-dns-developers-api)) + Potential providers are as follows. If you would like to contribute one, please open a pull request. @@ -38,7 +40,6 @@ Potential providers are as follows. If you would like to contribute one, please - OnApp DNS ([docs](https://docs.onapp.com/display/3api/DNS+Zones)) - PowerDNS ([docs](https://doc.powerdns.com/md/httpapi/api_spec/)) - Rackspace ([docs](https://developer.rackspace.com/docs/cloud-dns/v1/developer-guide/)) -- Rage4 ([docs](https://gbshouse.uservoice.com/knowledgebase/articles/109834-rage4-dns-developers-api)) - Transip ([docs](https://www.transip.nl/transip/api/)) - UltraDNS ([docs](https://restapi.ultradns.com/v1/docs)) - Yandex ([docs](https://tech.yandex.com/domain/doc/reference/dns-add-docpage/)) diff --git a/lexicon/providers/rage4.py b/lexicon/providers/rage4.py new file mode 100644 index 000000000..9a6ed78e3 --- /dev/null +++ b/lexicon/providers/rage4.py @@ -0,0 +1,139 @@ +from base import Provider as BaseProvider +import requests +import json + +class Provider(BaseProvider): + + def __init__(self, options, provider_options={}): + super(Provider, self).__init__(options) + self.domain_id = None + self.api_endpoint = provider_options.get('api_endpoint') or 'https://rage4.com/rapi' + + def authenticate(self): + + payload = self._get('/getdomainbyname/', {'name': self.options['domain']}) + + if not payload['id']: + raise StandardError('No domain found') + + self.domain_id = payload['id'] + + # Create record. If record already exists with the same content, do nothing' + def create_record(self, type, name, content): + record = { + 'id': self.domain_id, + 'name': self._clean_name(name), + 'content': content, + 'type': type + } + payload = {} + try: + payload = self._post('/createrecord/',{},record) + except requests.exceptions.HTTPError, e: + if e.response.status_code == 400: + payload = {} + + # http 400 is ok here, because the record probably already exists + print 'create_record: {0}'.format(payload['status']) + return payload['status'] + + # List all records. Return an empty list if no records found + # type, name and content are used to filter records. + # If possible filter during the query, otherwise filter after response is received. + def list_records(self, type=None, name=None, content=None): + filter = { + 'id': self.domain_id + } + if name: + filter['name'] = self._clean_name(name) + payload = self._get('/getrecords/', filter) + + records = [] + for record in payload: + processed_record = { + 'type': record['type'], + 'name': record['name'], + 'ttl': record['ttl'], + 'content': record['content'], + 'id': record['id'] + } + records.append(processed_record) + + + print 'list_records: {0}'.format(records) + return records + + # Create or update a record. + def update_record(self, identifier, type=None, name=None, content=None): + + data = { + 'id': identifier + } + + if name: + data['name'] = self._clean_name(name) + if content: + data['content'] = content + # if type: + # raise 'Type updating is not supported by this provider.' + + payload = self._put('/updaterecord/', {}, data) + + print 'update_record: {0}'.format(payload['status']) + return payload['status'] + + # Delete an existing record. + # If record does not exist, do nothing. + def delete_record(self, identifier=None, type=None, name=None, content=None): + if not identifier: + records = self.list_records(type, name, content) + print records + if len(records) == 1: + identifier = records[0]['id'] + else: + raise StandardError('Record identifier could not be found.') + payload = self._post('/deleterecord/', {'id': identifier}) + + # is always True at this point, if a non 200 response is returned an error is raised. + print 'delete_record: {0}'.format(payload['status']) + return payload['status'] + + + # Helpers + + # record names can be in a variety of formats: relative (sub), full (sub.example.com), and fqdn (sub.example.com.) + # Rage4 handles full record names, so we need to make sure we clean up all user specified record_names before + # submitting them + def _clean_name(self, record_name): + record_name = record_name.rstrip('.') # strip trailing period from fqdn if present + #check if the record_name is fully specified + if not record_name.endswith(self.options['domain']): + record_name = "{0}.{1}".format(record_name, self.options['domain']) + return record_name + + def _get(self, url='/', query_params={}): + return self._request('GET', url, query_params=query_params) + + def _post(self, url='/', data={}, query_params={}): + return self._request('POST', url, data=data, query_params=query_params) + + def _put(self, url='/', data={}, query_params={}): + return self._request('PUT', url, data=data, query_params=query_params) + + def _delete(self, url='/', query_params={}): + return self._request('DELETE', url, query_params=query_params) + + def _request(self, action='GET', url='/', data={}, query_params={}): + + default_headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + default_auth = requests.auth.HTTPBasicAuth(self.options['auth_username'], self.options['auth_token']) + + r = requests.request(action, self.api_endpoint + url, params=query_params, + data=json.dumps(data), + headers=default_headers, + auth=default_auth) + r.raise_for_status() # if the request fails for any reason, throw an error. + return r.json() diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml new file mode 100644 index 000000000..70c680d8a --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml @@ -0,0 +1,27 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:15 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml new file mode 100644 index 000000000..ecc9e8dbd --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=thisisadomainidonotown.com + response: + body: {string: !!python/unicode '{"status":false,"id":0,"error":"Unable to fetch + the item or API access not allowed"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['84'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:16 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml new file mode 100644 index 000000000..2e9f489c5 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:23 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=127.0.0.1&type=A&id=57039&name=localhost.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954621,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:43 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml new file mode 100644 index 000000000..157f8ba77 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:24 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=docs.example.com&type=CNAME&id=57039&name=docs.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954623,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:38 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml new file mode 100644 index 000000000..e86a7e586 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:18 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.fqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954625,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:45 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml new file mode 100644 index 000000000..48be6989d --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:25 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.full.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954627,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:39 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml new file mode 100644 index 000000000..2de5cd25e --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:20 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954629,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:47 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml new file mode 100644 index 000000000..dfa2f2ba0 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:27 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfilt.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954631,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:42 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfilt.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954631,"name":"delete.testfilt.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:59 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1954631}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1954631,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:08 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfilt.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:17 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml new file mode 100644 index 000000000..a773c79a6 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:21 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954633,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:48 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954633,"name":"delete.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:54 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1954633}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1954633,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:03 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:11 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml new file mode 100644 index 000000000..688fddf81 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:28 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfull.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954635,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:50 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfull.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954635,"name":"delete.testfull.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:01 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1954635}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1954635,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:10 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfull.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:18 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml new file mode 100644 index 000000000..bd5dce294 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:23 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testid.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954637,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:45 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testid.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954637,"name":"delete.testid.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['351'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:56 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1954637}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1954637,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:05 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testid.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:13 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml new file mode 100644 index 000000000..6c091439f --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:30 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.fqdntest.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954639,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:52 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.fqdntest.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954639,"name":"random.fqdntest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:03 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml new file mode 100644 index 000000000..d61785c5a --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:25 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.fulltest.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954641,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:47 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.fulltest.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954641,"name":"random.fulltest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:57 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml new file mode 100644 index 000000000..e14b394af --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:31 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954643,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:54 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954643,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['349'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:04 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml new file mode 100644 index 000000000..5286ef04f --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:26 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039 + response: + body: {string: !!python/unicode '[{"id":1952177,"name":"capsulecd.com","content":"ns1.r4ns.com","type":"NS","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952179,"name":"capsulecd.com","content":"ns2.r4ns.net","type":"NS","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952181,"name":"capsulecd.com","content":"ns1.r4ns.com + lexicon.mailinator.com 1459319994 10800 3600 604800 3600","type":"SOA","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954621,"name":"localhost.capsulecd.com","content":"127.0.0.1","type":"A","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954623,"name":"docs.capsulecd.com","content":"docs.example.com","type":"CNAME","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954625,"name":"_acme-challenge.fqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954627,"name":"_acme-challenge.full.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954629,"name":"_acme-challenge.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954631,"name":"delete.testfilt.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954633,"name":"delete.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954635,"name":"delete.testfull.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954637,"name":"delete.testid.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954639,"name":"random.fqdntest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954641,"name":"random.fulltest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954643,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['5271'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:48 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml new file mode 100644 index 000000000..1e7a64399 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:27 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954647,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:50 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1954647,"name":"orig.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['351'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:39:59 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: PUT + uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1954647&name=updated.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1954647,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 30 Mar 2016 06:40:07 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/providers/test_rage4.py b/tests/providers/test_rage4.py new file mode 100644 index 000000000..736eb1aec --- /dev/null +++ b/tests/providers/test_rage4.py @@ -0,0 +1,24 @@ +# Test for one implementation of the interface +from lexicon.providers.rage4 import Provider +from integration_tests import IntegrationTests +from unittest import TestCase +import pytest + +# Hook into testing framework by inheriting unittest.TestCase and reuse +# the tests which *each and every* implementation of the interface must +# pass, by inheritance from define_tests.TheTests +class Rage4ProviderTests(TestCase, IntegrationTests): + + Provider = Provider + provider_name = 'rage4' + domain = 'capsulecd.com' + def _filter_headers(self): + return ['Authorization'] + + @pytest.mark.skip(reason="update requires type to be specified for this provider") + def test_Provider_when_calling_update_record_with_full_name_should_modify_record(self): + return + + @pytest.mark.skip(reason="update requires type to be specified for this provider") + def test_Provider_when_calling_update_record_should_modify_record(self): + return \ No newline at end of file