test: add initial test cases
This commit is contained in:
parent
a01f1575c9
commit
4b9ae5ff3f
5 changed files with 28 additions and 1 deletions
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
17
tests/test_checkcert.py
Normal file
17
tests/test_checkcert.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from checkcert.checkcert import main as cert_main
|
||||
from checkcert.checkcert import __version__ as cert_version
|
||||
from click.testing import CliRunner
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
|
||||
def test_main():
|
||||
if cert_main:
|
||||
response = runner.invoke(cert_main, ["www.franklin.edu"])
|
||||
assert response.exit_code == 0
|
||||
|
||||
|
||||
def test_version():
|
||||
response = runner.invoke(cert_main, ["--version"])
|
||||
assert response.exit_code == 0
|
||||
assert cert_version in response.output
|
Loading…
Add table
Add a link
Reference in a new issue