From 966066acf72435cdf068c1faea086ec8cd983da4 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 26 Mar 2016 19:29:42 -0700 Subject: [PATCH] fixed dnsmadeeasy, (id, ttl is required in the payload). Readded previously skipped tests, added new vcr recordings. --- lexicon/providers/dnsmadeeasy.py | 7 +- ...ng_update_record_should_modify_record.yaml | 159 ++++-------------- ...d_with_fqdn_name_should_modify_record.yaml | 158 ++++------------- ...d_with_full_name_should_modify_record.yaml | 158 ++++------------- tests/providers/test_dnsmadeeasy.py | 14 -- 5 files changed, 101 insertions(+), 395 deletions(-) diff --git a/lexicon/providers/dnsmadeeasy.py b/lexicon/providers/dnsmadeeasy.py index 5bbe7bd30..8ef8cdfdd 100644 --- a/lexicon/providers/dnsmadeeasy.py +++ b/lexicon/providers/dnsmadeeasy.py @@ -75,7 +75,10 @@ def list_records(self, type=None, name=None, content=None): # Create or update a record. def update_record(self, identifier, type=None, name=None, content=None): - data = {} + data = { + 'id': identifier, + 'ttl': 86400 + } if name: data['name'] = self._clean_name(name) @@ -84,7 +87,7 @@ def update_record(self, identifier, type=None, name=None, content=None): if type: data['type'] = type - payload = self._put('/dns/managed/{0}/records/{1}/'.format(self.domain_id, identifier), data) + payload = self._put('/dns/managed/{0}/records/{1}'.format(self.domain_id, identifier), data) print 'update_record: {0}'.format(True) return True diff --git a/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml index 647b15cfb..992a146af 100644 --- a/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml +++ b/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml @@ -8,19 +8,19 @@ interactions: Content-Length: ['2'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:32:28 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:25 GMT'] method: GET uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/name?domainname=capsulecd.com response: - body: {string: !!python/unicode '{"name":"capsulecd.com","id":874984,"created":1458864000000,"nameServers":[{"fqdn":"ns0.dnsmadeeasy.com","ipv4":"208.94.148.2","ipv6":"2600:1800:0::1"},{"fqdn":"ns1.dnsmadeeasy.com","ipv4":"208.80.124.2","ipv6":"2600:1801:1::1"},{"fqdn":"ns2.dnsmadeeasy.com","ipv4":"208.80.126.2","ipv6":"2600:1802:2::1"},{"fqdn":"ns3.dnsmadeeasy.com","ipv4":"208.80.125.2","ipv6":"2600:1801:3::1"},{"fqdn":"ns4.dnsmadeeasy.com","ipv4":"208.80.127.2","ipv6":"2600:1802:4::1"}],"pendingActionId":0,"updated":1458927142798,"processMulti":false,"activeThirdParties":[],"delegateNameServers":["dawn.ns.cloudflare.com.","owen.ns.cloudflare.com."],"folderId":1668,"gtdEnabled":false}'} + body: {string: !!python/unicode '{"name":"capsulecd.com","id":874984,"created":1458864000000,"nameServers":[{"fqdn":"ns0.dnsmadeeasy.com","ipv4":"208.94.148.2","ipv6":"2600:1800:0::1"},{"fqdn":"ns1.dnsmadeeasy.com","ipv4":"208.80.124.2","ipv6":"2600:1801:1::1"},{"fqdn":"ns2.dnsmadeeasy.com","ipv4":"208.80.126.2","ipv6":"2600:1802:2::1"},{"fqdn":"ns3.dnsmadeeasy.com","ipv4":"208.80.125.2","ipv6":"2600:1801:3::1"},{"fqdn":"ns4.dnsmadeeasy.com","ipv4":"208.80.127.2","ipv6":"2600:1802:4::1"}],"pendingActionId":0,"updated":1459045638187,"processMulti":false,"activeThirdParties":[],"delegateNameServers":["dawn.ns.cloudflare.com.","owen.ns.cloudflare.com."],"folderId":1668,"gtdEnabled":false}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:32:29 GMT'] + date: ['Sun, 27 Mar 2016 02:27:26 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=D1807051BE7BF2F6C4C2A8A166CDC2A5; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [ed6f3743-0abf-442f-af29-3fb9b7ccfd49] + set-cookie: [JSESSIONID=E6AD39B20340A0BF2E6F2F1DD3AE4E30; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [ddcb4d26-bda9-4042-ad93-13fd9ad177bb] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['138'] + x-dnsme-requestsremaining: ['135'] status: {code: 200, message: OK} - request: body: '{"type": "TXT", "name": "orig.test", "value": "challengetoken", "ttl": @@ -32,20 +32,20 @@ interactions: Content-Length: ['77'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:32:28 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:26 GMT'] method: POST uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/ response: - body: {string: !!python/unicode '{"name":"orig.test","value":"\"challengetoken\"","id":10098493,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}'} + body: {string: !!python/unicode '{"name":"orig.test","value":"\"challengetoken\"","id":10098505,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:32:29 GMT'] - location: ['http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098493'] + date: ['Sun, 27 Mar 2016 02:27:26 GMT'] + location: ['http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098505'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=91055E48936CF2F7CB55A8B58949619D; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [8bbddffd-f56f-475c-89e4-4b4a38f2a828] + set-cookie: [JSESSIONID=806156B96828627AFF295F9D234AFC71; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [23c14237-4c65-4c8c-a3b5-d929d5ec7d9c] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['137'] + x-dnsme-requestsremaining: ['134'] status: {code: 201, message: Created} - request: body: '{}' @@ -56,138 +56,43 @@ interactions: Content-Length: ['2'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:32:29 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:26 GMT'] method: GET uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records?recordName=orig.test&type=TXT response: - body: {string: !!python/unicode '{"data":[{"name":"orig.test","value":"\"challengetoken\"","id":10098493,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}],"page":0,"totalRecords":1,"totalPages":1}'} + body: {string: !!python/unicode '{"data":[{"name":"orig.test","value":"\"challengetoken\"","id":10098505,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}],"page":0,"totalRecords":1,"totalPages":1}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:32:29 GMT'] + date: ['Sun, 27 Mar 2016 02:27:26 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=52198351D797B02A7BC4BBD9A5255248; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [b0c5bd25-8471-41e8-b3bc-8edca361f73e] + set-cookie: [JSESSIONID=2E22CEE44050796855DA1DB8EBD1FC38; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [f81e0825-b21c-4373-964f-0c4761b082a3] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['136'] + x-dnsme-requestsremaining: ['133'] status: {code: 200, message: OK} - request: - body: '{"type": "TXT", "name": "updated.test", "value": "challengetoken", "ttl": - 86400}' + body: '{"value": "challengetoken", "type": "TXT", "id": 10098505, "name": "updated.test", + "ttl": 86400}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['80'] + Content-Length: ['96'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:32:29 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:26 GMT'] method: PUT - uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098493/ + uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098505 response: - body: {string: !!python/unicode "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ - \n\r\n\r\n\tManagement Console\r\n\t\r\n\r\n\r\n\ - \ \r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n \r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n \r\ - \n\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\r\n \r\n\r\n \r\n \r\n\ - \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\t

\r\n\t\tEnter\ - \ a title and description of your issue and a support ticket will be created\ - \ for you.\r\n\t

\r\n\t
\r\n\r\n\t\ -
\r\n\t\t
\r\n\t\t\t\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n\t

\r\ - \n\t\tTo view the status of an existing ticket, visit the support site.\r\n\ - \t

\r\n
\r\n\r\n\r\n\ -
\r\n\t\r\n\t\t\r\n\t\r\n\t

A system error has occurred.

\r\n\t

\r\n\t\tHave no fear - our team of emergency response nerds have\ - \ already been alerted and are on the case.\r\n\t

\r\n\r\n\tReturn to console\t\ -
\r\n\t\r\n\t\tSubmit a support ticket\r\n\t\r\n\tSupport Center\r\n\t
\r\n\t
\r\n\t\tCurrent IP address:
\r\n\t\tLast logged in\ - \ on Fri Mar 25 00:00:00 UTC 2016 from 208.72.142.184

\r\n\t\ -
\r\n\t
\r\n\t\tCurrent Date and\ - \ Time: 2016-03-25 17:32:30:374
\r\n\t
\r\n\t\r\n
\r\ - \n\r\n\r\n"} + body: {string: !!python/unicode ''} headers: - connection: [close] - content-type: [text/html;charset=ISO-8859-1] - date: ['Fri, 25 Mar 2016 17:32:29 GMT'] + content-length: ['0'] + content-type: [application/json] + date: ['Sun, 27 Mar 2016 02:27:28 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=E79F41C82F35FA352B372465760EB497; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [9a8aaa9c-d913-4e98-b06a-558e439082f8] + set-cookie: [JSESSIONID=E727B449C60C6087C41F87B1854FEFC8; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [efc9ab60-6f9f-4c9c-932e-260c7ff43dbb] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['135'] - status: {code: 500, message: Internal Server Error} + x-dnsme-requestsremaining: ['132'] + status: {code: 200, message: OK} version: 1 diff --git a/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml index 35554980a..d9532e8ea 100644 --- a/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml +++ b/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -8,19 +8,19 @@ interactions: Content-Length: ['2'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:33:46 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:27 GMT'] method: GET uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/name?domainname=capsulecd.com response: - body: {string: !!python/unicode '{"name":"capsulecd.com","id":874984,"created":1458864000000,"nameServers":[{"fqdn":"ns0.dnsmadeeasy.com","ipv4":"208.94.148.2","ipv6":"2600:1800:0::1"},{"fqdn":"ns1.dnsmadeeasy.com","ipv4":"208.80.124.2","ipv6":"2600:1801:1::1"},{"fqdn":"ns2.dnsmadeeasy.com","ipv4":"208.80.126.2","ipv6":"2600:1802:2::1"},{"fqdn":"ns3.dnsmadeeasy.com","ipv4":"208.80.125.2","ipv6":"2600:1801:3::1"},{"fqdn":"ns4.dnsmadeeasy.com","ipv4":"208.80.127.2","ipv6":"2600:1802:4::1"}],"pendingActionId":0,"updated":1458927142798,"processMulti":false,"activeThirdParties":[],"delegateNameServers":["dawn.ns.cloudflare.com.","owen.ns.cloudflare.com."],"folderId":1668,"gtdEnabled":false}'} + body: {string: !!python/unicode '{"name":"capsulecd.com","id":874984,"created":1458864000000,"nameServers":[{"fqdn":"ns0.dnsmadeeasy.com","ipv4":"208.94.148.2","ipv6":"2600:1800:0::1"},{"fqdn":"ns1.dnsmadeeasy.com","ipv4":"208.80.124.2","ipv6":"2600:1801:1::1"},{"fqdn":"ns2.dnsmadeeasy.com","ipv4":"208.80.126.2","ipv6":"2600:1802:2::1"},{"fqdn":"ns3.dnsmadeeasy.com","ipv4":"208.80.125.2","ipv6":"2600:1801:3::1"},{"fqdn":"ns4.dnsmadeeasy.com","ipv4":"208.80.127.2","ipv6":"2600:1802:4::1"}],"pendingActionId":0,"updated":1459045638187,"processMulti":false,"activeThirdParties":[],"delegateNameServers":["dawn.ns.cloudflare.com.","owen.ns.cloudflare.com."],"folderId":1668,"gtdEnabled":false}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:33:47 GMT'] + date: ['Sun, 27 Mar 2016 02:27:28 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=B2B8AA22FA4EA66EBC3E139928842BEC; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [7c5d2a80-0257-4172-9bd1-47026853e57d] + set-cookie: [JSESSIONID=F56F501FAA7E95AC363DBE476E67D7C0; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [d8b566b8-6a02-4295-bc99-222f0a6f0711] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['138'] + x-dnsme-requestsremaining: ['131'] status: {code: 200, message: OK} - request: body: '{"type": "TXT", "name": "orig.testfqdn", "value": "challengetoken", "ttl": @@ -32,20 +32,20 @@ interactions: Content-Length: ['81'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:33:46 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:27 GMT'] method: POST uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/ response: - body: {string: !!python/unicode '{"name":"orig.testfqdn","value":"\"challengetoken\"","id":10098494,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}'} + body: {string: !!python/unicode '{"name":"orig.testfqdn","value":"\"challengetoken\"","id":10098506,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:33:47 GMT'] - location: ['http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098494'] + date: ['Sun, 27 Mar 2016 02:27:28 GMT'] + location: ['http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098506'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=E79CA719781D78CE93A8458ECD44991F; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [f13122f8-2ae0-4d60-a0f9-96395ee3d7c5] + set-cookie: [JSESSIONID=044B41DB068718D40A3131D9B245C294; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [d467b83f-27f5-4076-a8ac-20fb2ad0dd2e] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['137'] + x-dnsme-requestsremaining: ['130'] status: {code: 201, message: Created} - request: body: '{}' @@ -56,137 +56,43 @@ interactions: Content-Length: ['2'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:33:47 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:28 GMT'] method: GET uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records?recordName=orig.testfqdn&type=TXT response: - body: {string: !!python/unicode '{"data":[{"name":"orig.testfqdn","value":"\"challengetoken\"","id":10098494,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}],"page":0,"totalRecords":1,"totalPages":1}'} + body: {string: !!python/unicode '{"data":[{"name":"orig.testfqdn","value":"\"challengetoken\"","id":10098506,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}],"page":0,"totalRecords":1,"totalPages":1}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:33:47 GMT'] + date: ['Sun, 27 Mar 2016 02:27:29 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=EAA4261CC7D7EDBB99823B072517C106; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [23a50f35-7ccd-45a6-a3bb-62d0498665ab] + set-cookie: [JSESSIONID=E803B1B40182B4FA383EC271A08171C5; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [3f4354c0-53c8-475e-92e1-154c88a23c89] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['136'] + x-dnsme-requestsremaining: ['129'] status: {code: 200, message: OK} - request: - body: '{"type": "TXT", "name": "updated.testfqdn", "value": "challengetoken"}' + body: '{"value": "challengetoken", "type": "TXT", "id": 10098506, "name": "updated.testfqdn", + "ttl": 86400}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['70'] + Content-Length: ['100'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:33:47 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:27:28 GMT'] method: PUT - uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098494/ + uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098506 response: - body: {string: !!python/unicode "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ - \n\r\n\r\n\tManagement Console\r\n\t\r\n\r\n\r\n\ - \ \r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n \r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n \r\ - \n\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\r\n \r\n\r\n \r\n \r\n\ - \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\t

\r\n\t\tEnter\ - \ a title and description of your issue and a support ticket will be created\ - \ for you.\r\n\t

\r\n\t
\r\n\r\n\t\ -
\r\n\t\t
\r\n\t\t\t\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n\t

\r\ - \n\t\tTo view the status of an existing ticket, visit the support site.\r\n\ - \t

\r\n
\r\n\r\n\r\n\ -
\r\n\t\r\n\t\t\r\n\t\r\n\t

A system error has occurred.

\r\n\t

\r\n\t\tHave no fear - our team of emergency response nerds have\ - \ already been alerted and are on the case.\r\n\t

\r\n\r\n\tReturn to console\t\ -
\r\n\t\r\n\t\tSubmit a support ticket\r\n\t\r\n\tSupport Center\r\n\t
\r\n\t
\r\n\t\tCurrent IP address:
\r\n\t\tLast logged in\ - \ on Fri Mar 25 00:00:00 UTC 2016 from 208.72.142.184

\r\n\t\ -
\r\n\t
\r\n\t\tCurrent Date and\ - \ Time: 2016-03-25 17:33:48:326
\r\n\t
\r\n\t\r\n
\r\ - \n\r\n\r\n"} + body: {string: !!python/unicode ''} headers: - connection: [close] - content-type: [text/html;charset=ISO-8859-1] - date: ['Fri, 25 Mar 2016 17:33:48 GMT'] + content-length: ['0'] + content-type: [application/json] + date: ['Sun, 27 Mar 2016 02:27:29 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=7E20AB26049B26DDE2F16B4144B7D621; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [915383c3-96c4-46b0-8519-953bb29238b0] + set-cookie: [JSESSIONID=0427760C90CC717236D6C1554CBEE255; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [2462f188-fdcc-456f-9b40-46fb7b22317b] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['135'] - status: {code: 500, message: Internal Server Error} + x-dnsme-requestsremaining: ['128'] + status: {code: 200, message: OK} version: 1 diff --git a/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml index 1bc30ff73..4592604c5 100644 --- a/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml +++ b/tests/fixtures/cassettes/dnsmadeeasy/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml @@ -8,19 +8,19 @@ interactions: Content-Length: ['2'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:34:34 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:28:14 GMT'] method: GET uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/name?domainname=capsulecd.com response: - body: {string: !!python/unicode '{"name":"capsulecd.com","id":874984,"created":1458864000000,"nameServers":[{"fqdn":"ns0.dnsmadeeasy.com","ipv4":"208.94.148.2","ipv6":"2600:1800:0::1"},{"fqdn":"ns1.dnsmadeeasy.com","ipv4":"208.80.124.2","ipv6":"2600:1801:1::1"},{"fqdn":"ns2.dnsmadeeasy.com","ipv4":"208.80.126.2","ipv6":"2600:1802:2::1"},{"fqdn":"ns3.dnsmadeeasy.com","ipv4":"208.80.125.2","ipv6":"2600:1801:3::1"},{"fqdn":"ns4.dnsmadeeasy.com","ipv4":"208.80.127.2","ipv6":"2600:1802:4::1"}],"pendingActionId":0,"updated":1458927243941,"processMulti":false,"activeThirdParties":[],"delegateNameServers":["dawn.ns.cloudflare.com.","owen.ns.cloudflare.com."],"folderId":1668,"gtdEnabled":false}'} + body: {string: !!python/unicode '{"name":"capsulecd.com","id":874984,"created":1458864000000,"nameServers":[{"fqdn":"ns0.dnsmadeeasy.com","ipv4":"208.94.148.2","ipv6":"2600:1800:0::1"},{"fqdn":"ns1.dnsmadeeasy.com","ipv4":"208.80.124.2","ipv6":"2600:1801:1::1"},{"fqdn":"ns2.dnsmadeeasy.com","ipv4":"208.80.126.2","ipv6":"2600:1802:2::1"},{"fqdn":"ns3.dnsmadeeasy.com","ipv4":"208.80.125.2","ipv6":"2600:1801:3::1"},{"fqdn":"ns4.dnsmadeeasy.com","ipv4":"208.80.127.2","ipv6":"2600:1802:4::1"}],"pendingActionId":0,"updated":1459045687231,"processMulti":false,"activeThirdParties":[],"delegateNameServers":["dawn.ns.cloudflare.com.","owen.ns.cloudflare.com."],"folderId":1668,"gtdEnabled":false}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:34:35 GMT'] + date: ['Sun, 27 Mar 2016 02:28:15 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=793FB6DA9A431A4826D99DE95D214D0B; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [dfa2eb5e-3899-4d00-b91d-7efd35d1510b] + set-cookie: [JSESSIONID=C7B48C3E5430DC946683475C88472E19; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [4a546ff1-c859-4052-b8d7-7b2bb7595996] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['131'] + x-dnsme-requestsremaining: ['123'] status: {code: 200, message: OK} - request: body: '{"type": "TXT", "name": "orig.test", "value": "challengetoken", "ttl": @@ -32,20 +32,20 @@ interactions: Content-Length: ['77'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:34:34 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:28:14 GMT'] method: POST uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/ response: - body: {string: !!python/unicode '{"name":"orig.test","value":"\"challengetoken\"","id":10098495,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}'} + body: {string: !!python/unicode '{"name":"orig.test","value":"\"challengetoken\"","id":10098508,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:34:35 GMT'] - location: ['http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098495'] + date: ['Sun, 27 Mar 2016 02:28:15 GMT'] + location: ['http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098508'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=13FAE23D4167F9DEE1DC95284C460020; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [426492ea-48ca-4572-93d2-6806ee231011] + set-cookie: [JSESSIONID=55C7325DC6DABAFB47FAF0A34D880315; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [4bda8fb2-613b-4b58-88a2-a5d775e9b698] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['130'] + x-dnsme-requestsremaining: ['122'] status: {code: 201, message: Created} - request: body: '{}' @@ -56,137 +56,43 @@ interactions: Content-Length: ['2'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:34:35 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:28:15 GMT'] method: GET uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records?recordName=orig.test&type=TXT response: - body: {string: !!python/unicode '{"data":[{"name":"orig.test","value":"\"challengetoken\"","id":10098495,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}],"page":0,"totalRecords":1,"totalPages":1}'} + body: {string: !!python/unicode '{"data":[{"name":"orig.test","value":"\"challengetoken\"","id":10098508,"type":"TXT","source":1,"dynamicDns":false,"failed":false,"gtdLocation":"DEFAULT","hardLink":false,"ttl":86400,"failover":false,"monitor":false,"sourceId":874984}],"page":0,"totalRecords":1,"totalPages":1}'} headers: content-type: [application/json] - date: ['Fri, 25 Mar 2016 17:34:35 GMT'] + date: ['Sun, 27 Mar 2016 02:28:15 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=9A7B5C2AB29DA6884C795E7834A61E1B; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [c8dc3d11-3772-4c97-b627-16ad7eeea584] + set-cookie: [JSESSIONID=141D2F1CCDCAB82868E33A8779D9D0F3; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [1230cfd6-b059-421c-a39b-a0981c62d415] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['129'] + x-dnsme-requestsremaining: ['121'] status: {code: 200, message: OK} - request: - body: '{"type": "TXT", "name": "updated.test", "value": "challengetoken"}' + body: '{"value": "challengetoken", "type": "TXT", "id": 10098508, "name": "updated.test", + "ttl": 86400}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['66'] + Content-Length: ['96'] Content-Type: [application/json] User-Agent: [python-requests/2.9.1] - x-dnsme-requestDate: ['Fri, 25 Mar 2016 17:34:35 GMT'] + x-dnsme-requestDate: ['Sun, 27 Mar 2016 02:28:15 GMT'] method: PUT - uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098495/ + uri: http://api.sandbox.dnsmadeeasy.com/V2.0/dns/managed/874984/records/10098508 response: - body: {string: !!python/unicode "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ - \n\r\n\r\n\tManagement Console\r\n\t\r\n\r\n\r\n\ - \ \r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n \r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n \r\ - \n\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\r\n \r\n\r\n \r\n \r\n\ - \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\t

\r\n\t\tEnter\ - \ a title and description of your issue and a support ticket will be created\ - \ for you.\r\n\t

\r\n\t
\r\n\r\n\t\ -
\r\n\t\t
\r\n\t\t\t\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n\t

\r\ - \n\t\tTo view the status of an existing ticket, visit the support site.\r\n\ - \t

\r\n
\r\n\r\n\r\n\ -
\r\n\t\r\n\t\t\r\n\t\r\n\t

A system error has occurred.

\r\n\t

\r\n\t\tHave no fear - our team of emergency response nerds have\ - \ already been alerted and are on the case.\r\n\t

\r\n\r\n\tReturn to console\t\ -
\r\n\t\r\n\t\tSubmit a support ticket\r\n\t\r\n\tSupport Center\r\n\t
\r\n\t
\r\n\t\tCurrent IP address:
\r\n\t\tLast logged in\ - \ on Fri Mar 25 00:00:00 UTC 2016 from 208.72.142.184

\r\n\t\ -
\r\n\t
\r\n\t\tCurrent Date and\ - \ Time: 2016-03-25 17:34:36:241
\r\n\t
\r\n\t\r\n
\r\ - \n\r\n\r\n"} + body: {string: !!python/unicode ''} headers: - connection: [close] - content-type: [text/html;charset=ISO-8859-1] - date: ['Fri, 25 Mar 2016 17:34:36 GMT'] + content-length: ['0'] + content-type: [application/json] + date: ['Sun, 27 Mar 2016 02:28:17 GMT'] server: [Apache-Coyote/1.1] - set-cookie: [JSESSIONID=F84E55C4153C27E0DF78271B85DD50D7; Path=/V2.0/; HttpOnly] - x-dnsme-requestid: [bed88905-6028-4820-911c-0a2068392ea0] + set-cookie: [JSESSIONID=321A9AB4C0959C9E77B85A5863EAF92E; Path=/V2.0/; HttpOnly] + x-dnsme-requestid: [9134e2b9-6ca7-47de-9b9a-f70064566430] x-dnsme-requestlimit: ['150'] - x-dnsme-requestsremaining: ['128'] - status: {code: 500, message: Internal Server Error} + x-dnsme-requestsremaining: ['120'] + status: {code: 200, message: OK} version: 1 diff --git a/tests/providers/test_dnsmadeeasy.py b/tests/providers/test_dnsmadeeasy.py index a3af7efcd..ef0835a7f 100644 --- a/tests/providers/test_dnsmadeeasy.py +++ b/tests/providers/test_dnsmadeeasy.py @@ -15,17 +15,3 @@ class DnsmadeeasyProviderTests(TestCase, IntegrationTests): provider_opts = {'api_endpoint': 'http://api.sandbox.dnsmadeeasy.com/V2.0'} def _filter_headers(self): return ['x-dnsme-apiKey', 'x-dnsme-hmac', 'Authorization'] - - - #Note DNSMadeEasy Update is failing with 500 Error. - @pytest.mark.skip(reason="update record is always returning a 500 error when using dnsmadeeasy.") - def test_Provider_when_calling_update_record_should_modify_record(self): - return - - @pytest.mark.skip(reason="update record is always returning a 500 error when using dnsmadeeasy.") - def test_Provider_when_calling_update_record_with_full_name_should_modify_record(self): - return - - @pytest.mark.skip(reason="update record is always returning a 500 error when using dnsmadeeasy.") - def test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record(self): - return \ No newline at end of file