From fa7f71d8599800fa5b54c2a2696f9793865a7481 Mon Sep 17 00:00:00 2001 From: Kush Bavishi Date: Wed, 7 Aug 2019 13:53:10 -0700 Subject: [PATCH] Modified paginate response to dummy values --- lemur/plugins/lemur_acme/tests/test_acme.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lemur/plugins/lemur_acme/tests/test_acme.py b/lemur/plugins/lemur_acme/tests/test_acme.py index 61a738bc..2d2055d8 100644 --- a/lemur/plugins/lemur_acme/tests/test_acme.py +++ b/lemur/plugins/lemur_acme/tests/test_acme.py @@ -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]]