fix tests

This commit is contained in:
Curtis Castrapel 2018-05-10 12:57:54 -07:00
parent 52e7ff9919
commit a9b9b27a0b
3 changed files with 7 additions and 7 deletions

View File

@ -69,7 +69,7 @@ class CertificateInputSchema(CertificateCreationSchema):
replaces = fields.Nested(AssociatedCertificateSchema, missing=[], many=True) replaces = fields.Nested(AssociatedCertificateSchema, missing=[], many=True)
replacements = fields.Nested(AssociatedCertificateSchema, missing=[], many=True) # deprecated replacements = fields.Nested(AssociatedCertificateSchema, missing=[], many=True) # deprecated
roles = fields.Nested(AssociatedRoleSchema, missing=[], many=True) roles = fields.Nested(AssociatedRoleSchema, missing=[], many=True)
dns_provider = fields.Nested(AssociatedDnsProviderSchema, required=False) dns_provider = fields.Nested(AssociatedDnsProviderSchema, missing=None, allow_none=True, required=False)
csr = fields.String(validate=validators.csr) csr = fields.String(validate=validators.csr)

View File

@ -260,11 +260,6 @@ class TestAcme(unittest.TestCase):
mock_current_app, mock_dns_provider_service, mock_acme): mock_current_app, mock_dns_provider_service, mock_acme):
provider = plugin.ACMEIssuerPlugin() provider = plugin.ACMEIssuerPlugin()
mock_authority = Mock() mock_authority = Mock()
issuer_options = {
'authority': mock_authority,
'dns_provider': {"id": 1},
"common_name": "test.netflix.net"
}
mock_client = Mock() mock_client = Mock()
mock_acme.return_value = (mock_client, "") mock_acme.return_value = (mock_client, "")
@ -274,6 +269,11 @@ class TestAcme(unittest.TestCase):
mock_dns_provider.provider_type = "route53" mock_dns_provider.provider_type = "route53"
mock_dns_provider_service.get.return_value = mock_dns_provider mock_dns_provider_service.get.return_value = mock_dns_provider
issuer_options = {
'authority': mock_authority,
'dns_provider': mock_dns_provider,
"common_name": "test.netflix.net"
}
csr = "123" csr = "123"
mock_request_certificate.return_value = ("pem_certificate", "chain") mock_request_certificate.return_value = ("pem_certificate", "chain")
result = provider.create_certificate(csr, issuer_options) result = provider.create_certificate(csr, issuer_options)

View File

@ -63,7 +63,7 @@ def test_get_certificate_primitives(certificate):
with freeze_time(datetime.date(year=2016, month=10, day=30)): with freeze_time(datetime.date(year=2016, month=10, day=30)):
primitives = get_certificate_primitives(certificate) primitives = get_certificate_primitives(certificate)
assert len(primitives) == 25 assert len(primitives) == 24
def test_certificate_edit_schema(session): def test_certificate_edit_schema(session):