fix v1 backwards compatibility

This commit is contained in:
Curtis Castrapel 2018-05-16 08:00:33 -07:00
parent 680f4966a1
commit de52fa7f48
2 changed files with 3 additions and 2 deletions

View File

@ -156,8 +156,8 @@ def get_domains(options):
def get_authorizations(acme_client, order, order_info, dns_provider):
authorizations = []
for domain in order.body.identifiers:
authz_record = start_dns_challenge(acme_client, order_info.account_number, domain.value, dns_provider, order)
for domain in order_info.domains:
authz_record = start_dns_challenge(acme_client, order_info.account_number, domain, dns_provider, order)
authorizations.append(authz_record)
return authorizations

View File

@ -170,6 +170,7 @@ class TestAcme(unittest.TestCase):
mock_order.body.identifiers.append(mock_domain)
mock_order_info = Mock()
mock_order_info.account_number = 1
mock_order_info.domains = ["test.fakedomain.net"]
result = plugin.get_authorizations("acme_client", mock_order, mock_order_info, "dns_provider")
self.assertEqual(result, ["test"])