fix test
This commit is contained in:
parent
f0f2092fb4
commit
efd5836e43
|
@ -1,5 +1,3 @@
|
||||||
import json
|
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from lemur import database
|
from lemur import database
|
||||||
from lemur.dns_providers.models import DnsProviders
|
from lemur.dns_providers.models import DnsProviders
|
||||||
|
|
|
@ -78,7 +78,6 @@ class DnsProvidersList(AuthenticatedResource):
|
||||||
args['user'] = g.user
|
args['user'] = g.user
|
||||||
return service.render(args)
|
return service.render(args)
|
||||||
|
|
||||||
|
|
||||||
@admin_permission.require(http_exception=403)
|
@admin_permission.require(http_exception=403)
|
||||||
def delete(self, dns_provider_id):
|
def delete(self, dns_provider_id):
|
||||||
service.delete(dns_provider_id)
|
service.delete(dns_provider_id)
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from acme import challenges
|
from lemur.plugins.lemur_acme import plugin
|
||||||
|
|
||||||
from lemur.plugins.lemur_acme import plugin, route53, cloudflare
|
|
||||||
from lemur.plugins.base import plugins
|
|
||||||
from mock import MagicMock, Mock, patch
|
from mock import MagicMock, Mock, patch
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,4 +113,3 @@ class TestAcme(unittest.TestCase):
|
||||||
result_client, result_registration = plugin.setup_acme_client(mock_authority)
|
result_client, result_registration = plugin.setup_acme_client(mock_authority)
|
||||||
assert result_client
|
assert result_client
|
||||||
assert result_registration
|
assert result_registration
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ def test_certificate_input_schema(client, authority):
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityEnd': arrow.get(2016, 11, 9).isoformat(),
|
'validityEnd': arrow.get(2016, 11, 9).isoformat(),
|
||||||
'validityStart': arrow.get(2015, 11, 9).isoformat(),
|
'validityStart': arrow.get(2015, 11, 9).isoformat(),
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -194,7 +194,7 @@ def test_certificate_input_with_extensions(client, authority):
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -209,7 +209,7 @@ def test_certificate_out_of_range_date(client, authority):
|
||||||
'authority': {'id': authority.id},
|
'authority': {'id': authority.id},
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityYears': 100,
|
'validityYears': 100,
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -234,7 +234,7 @@ def test_certificate_valid_years(client, authority):
|
||||||
'authority': {'id': authority.id},
|
'authority': {'id': authority.id},
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityYears': 1,
|
'validityYears': 1,
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -250,7 +250,7 @@ def test_certificate_valid_dates(client, authority):
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityStart': '2020-01-01T00:00:00',
|
'validityStart': '2020-01-01T00:00:00',
|
||||||
'validityEnd': '2020-01-01T00:00:01',
|
'validityEnd': '2020-01-01T00:00:01',
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -267,7 +267,7 @@ def test_certificate_cn_admin(client, authority, logged_in_admin):
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityStart': '2020-01-01T00:00:00',
|
'validityStart': '2020-01-01T00:00:00',
|
||||||
'validityEnd': '2020-01-01T00:00:01',
|
'validityEnd': '2020-01-01T00:00:01',
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -292,7 +292,7 @@ def test_certificate_allowed_names(client, authority, session, logged_in_user):
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -313,7 +313,7 @@ def test_certificate_incative_authority(client, authority, session, logged_in_us
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityStart': '2020-01-01T00:00:00',
|
'validityStart': '2020-01-01T00:00:00',
|
||||||
'validityEnd': '2020-01-01T00:00:01',
|
'validityEnd': '2020-01-01T00:00:01',
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -338,7 +338,7 @@ def test_certificate_disallowed_names(client, authority, session, logged_in_user
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
data, errors = CertificateInputSchema().load(input_data)
|
data, errors = CertificateInputSchema().load(input_data)
|
||||||
|
@ -357,7 +357,7 @@ def test_certificate_sensitive_name(client, authority, session, logged_in_user):
|
||||||
'description': 'testtestest',
|
'description': 'testtestest',
|
||||||
'validityStart': '2020-01-01T00:00:00',
|
'validityStart': '2020-01-01T00:00:00',
|
||||||
'validityEnd': '2020-01-01T00:00:01',
|
'validityEnd': '2020-01-01T00:00:01',
|
||||||
'dns_provider': None,
|
'dnsProvider': None,
|
||||||
}
|
}
|
||||||
session.add(Domain(name='sensitive.example.com', sensitive=True))
|
session.add(Domain(name='sensitive.example.com', sensitive=True))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue