test: add base coverage for all functions
This commit is contained in:
parent
4b9ae5ff3f
commit
d2a3a505fb
3 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
[run]
|
[run]
|
||||||
source =
|
source =
|
||||||
YOUR_SOURCE
|
checkcert
|
||||||
omit =
|
omit =
|
||||||
*/__init__.py
|
*/__init__.py
|
||||||
|
|
||||||
|
|
|
@ -38,4 +38,4 @@ def main(san, dump, port, expires, domain):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main() # pragma: no cover
|
||||||
|
|
|
@ -9,9 +9,21 @@ def test_main():
|
||||||
if cert_main:
|
if cert_main:
|
||||||
response = runner.invoke(cert_main, ["www.franklin.edu"])
|
response = runner.invoke(cert_main, ["www.franklin.edu"])
|
||||||
assert response.exit_code == 0
|
assert response.exit_code == 0
|
||||||
|
response = runner.invoke(cert_main, ["www.franklin.edu:443"])
|
||||||
|
assert response.exit_code == 0
|
||||||
|
|
||||||
|
|
||||||
def test_version():
|
def test_version():
|
||||||
response = runner.invoke(cert_main, ["--version"])
|
response = runner.invoke(cert_main, ["--version"])
|
||||||
assert response.exit_code == 0
|
assert response.exit_code == 0
|
||||||
assert cert_version in response.output
|
assert cert_version in response.output
|
||||||
|
|
||||||
|
|
||||||
|
def test_dump():
|
||||||
|
response = runner.invoke(cert_main, ["www.franklin.edu", "--dump"])
|
||||||
|
assert response.exit_code == 0
|
||||||
|
|
||||||
|
|
||||||
|
def test_san():
|
||||||
|
response = runner.invoke(cert_main, ["www.franklin.edu", "--san"])
|
||||||
|
assert response.exit_code == 0
|
||||||
|
|
Loading…
Reference in a new issue