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

fix broken test by updating the actual format of the answers

This commit is contained in:
Steve Coursen
2017-11-14 13:14:03 -05:00
parent 2cc17ffc7a
commit ce5ecc52e3
2 changed files with 4 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ class Ns1Provider(BaseProvider):
def _params_for_A(self, record):
params = {'answers': record.values, 'ttl': record.ttl}
if record.geo:
if hasattr(record, 'geo'):
# purposefully set non-geo answers to have an empty meta,
# so that we know we did this on purpose if/when troubleshooting
params['answers'] = [{"answer": x, "meta": {}}

View File

@@ -30,11 +30,13 @@ class TestNs1Provider(TestCase):
'ttl': 32,
'type': 'A',
'value': '1.2.3.4',
'meta': {},
}))
expected.add(Record.new(zone, 'foo', {
'ttl': 33,
'type': 'A',
'values': ['1.2.3.4', '1.2.3.5'],
'meta': {},
}))
expected.add(Record.new(zone, 'cname', {
'ttl': 34,
@@ -289,7 +291,7 @@ class TestNs1Provider(TestCase):
call('delete-me', u'A'),
])
mock_record.assert_has_calls([
call.update(answers=[u'1.2.3.4'], ttl=32),
call.update(answers=[{'answer': u'1.2.3.4', 'meta': {}}], ttl=32),
call.delete()
])