2015-10-09 07:46:40 +00:00
|
|
|
from click.testing import CliRunner
|
|
|
|
from certidude.cli import entry_point as cli
|
|
|
|
|
|
|
|
runner = CliRunner()
|
|
|
|
|
|
|
|
def test_ca_config():
|
|
|
|
# Authority setup
|
|
|
|
with runner.isolated_filesystem():
|
2016-03-27 21:18:41 +00:00
|
|
|
result = runner.invoke(cli, ['setup', 'authority'])
|
2015-10-09 07:46:40 +00:00
|
|
|
assert not result.exception
|
|
|
|
|
2016-03-27 21:18:41 +00:00
|
|
|
from certidude import authority
|
|
|
|
assert authority.certificate.serial_number == '0000000000000000000000000000000000000001'
|
2015-10-09 07:46:40 +00:00
|
|
|
# TODO: Figure out a way to properly test cert.signed, cert.expires, cert.digest, etc
|