diff --git a/functional_tests/test_help.py b/functional_tests/test_help.py index af3874499df618bb89a14f909d77f4edff9b779a..56c1f45851d6411a124b45200fd8ab9b9123e915 100644 --- a/functional_tests/test_help.py +++ b/functional_tests/test_help.py @@ -43,3 +43,17 @@ def test_cli_works(): # be on the safe side. assert stderr == '' assert process.returncode == 0 + + +def test_usage_help_shown(): + # Since John feels a bit lazy, he decides to skip reading the + # documentation, and just run the tool to see if he gets any + # useful help. + process = subprocess.Popen(["gimmecert"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = process.communicate() + stdout, stderr = stdout.decode(), stderr.decode() + + # John is presented with short usage instructions. + assert "usage: gimmecert [-h]" in stdout + assert stderr == '' + assert process.returncode == 0