Modified paginate response to dummy values

This commit is contained in:
Kush Bavishi 2019-08-07 13:53:10 -07:00
parent 3ff56fc595
commit fa7f71d859

View File

@ -390,6 +390,7 @@ class TestAcme(unittest.TestCase):
"message": "TXT record created"
}
result = ultradns.create_txt_record(domain, token, account_number)
# TODO: check change_id
mock_current_app.logger.debug.assert_called_with(log_data)
@patch("lemur.plugins.lemur_acme.ultradns.current_app")
@ -448,22 +449,22 @@ class TestAcme(unittest.TestCase):
account_number = "1234567890"
path = "a/b/c"
zones = ['example.com', 'test.example.com']
paginate_response = [{'properties': {'name': 'example.com.', 'accountName': 'netflix', 'type': 'PRIMARY',
paginate_response = [{'properties': {'name': 'example.com.', 'accountName': 'example', 'type': 'PRIMARY',
'dnssecStatus': 'UNSIGNED', 'status': 'ACTIVE', 'resourceRecordCount': 9,
'lastModifiedDateTime': '2017-06-14T06:45Z'}, 'registrarInfo': {
'nameServers': {'missing': ['pdns154.ultradns.com.', 'pdns154.ultradns.net.', 'pdns154.ultradns.biz.',
'pdns154.ultradns.org.']}}, 'inherit': 'ALL'},
{'properties': {'name': 'test.example.com.', 'accountName': 'netflix', 'type': 'PRIMARY',
'nameServers': {'missing': ['example.ultradns.com.', 'example.ultradns.net.', 'example.ultradns.biz.',
'example.ultradns.org.']}}, 'inherit': 'ALL'},
{'properties': {'name': 'test.example.com.', 'accountName': 'example', 'type': 'PRIMARY',
'dnssecStatus': 'UNSIGNED', 'status': 'ACTIVE', 'resourceRecordCount': 9,
'lastModifiedDateTime': '2017-06-14T06:45Z'}, 'registrarInfo': {
'nameServers': {'missing': ['pdns154.ultradns.com.', 'pdns154.ultradns.net.',
'pdns154.ultradns.biz.', 'pdns154.ultradns.org.']}},
'nameServers': {'missing': ['example.ultradns.com.', 'example.ultradns.net.',
'example.ultradns.biz.', 'example.ultradns.org.']}},
'inherit': 'ALL'},
{'properties': {'name': 'example2.com.', 'accountName': 'netflix', 'type': 'SECONDARY',
{'properties': {'name': 'example2.com.', 'accountName': 'example', 'type': 'SECONDARY',
'dnssecStatus': 'UNSIGNED', 'status': 'ACTIVE', 'resourceRecordCount': 9,
'lastModifiedDateTime': '2017-06-14T06:45Z'}, 'registrarInfo': {
'nameServers': {'missing': ['pdns154.ultradns.com.', 'pdns154.ultradns.net.',
'pdns154.ultradns.biz.', 'pdns154.ultradns.org.']}},
'nameServers': {'missing': ['example.ultradns.com.', 'example.ultradns.net.',
'example.ultradns.biz.', 'example.ultradns.org.']}},
'inherit': 'ALL'}]
ultradns._paginate = Mock(path, "zones")
ultradns._paginate.side_effect = [[paginate_response]]