fix v1 backwards compatibility
This commit is contained in:
parent
680f4966a1
commit
de52fa7f48
|
@ -156,8 +156,8 @@ def get_domains(options):
|
||||||
|
|
||||||
def get_authorizations(acme_client, order, order_info, dns_provider):
|
def get_authorizations(acme_client, order, order_info, dns_provider):
|
||||||
authorizations = []
|
authorizations = []
|
||||||
for domain in order.body.identifiers:
|
for domain in order_info.domains:
|
||||||
authz_record = start_dns_challenge(acme_client, order_info.account_number, domain.value, dns_provider, order)
|
authz_record = start_dns_challenge(acme_client, order_info.account_number, domain, dns_provider, order)
|
||||||
authorizations.append(authz_record)
|
authorizations.append(authz_record)
|
||||||
return authorizations
|
return authorizations
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,7 @@ class TestAcme(unittest.TestCase):
|
||||||
mock_order.body.identifiers.append(mock_domain)
|
mock_order.body.identifiers.append(mock_domain)
|
||||||
mock_order_info = Mock()
|
mock_order_info = Mock()
|
||||||
mock_order_info.account_number = 1
|
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")
|
result = plugin.get_authorizations("acme_client", mock_order, mock_order_info, "dns_provider")
|
||||||
self.assertEqual(result, ["test"])
|
self.assertEqual(result, ["test"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue