Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgillij committed Feb 18, 2021
1 parent e0adb7e commit 2523460
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
import unittest
import logging

from click.testing import CliRunner
from amdfan.amdfan import cli

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

class TestCli(unittest.TestCase):
def test_params(self):
daemon_param = "--daemon"
runner = CliRunner()
result = runner.invoke(cli, daemon_param)
logger.debug(dir(result))
assert result.exception
assert result.exit_code == 1 # should be permission denied for non-root
assert result.exit_code == 1 # should be permission denied for non-root
help_param = "--help"
result = runner.invoke(cli, help_param)
logger.debug(result.output)
assert result.exit_code == 0
manual_param = "--manual"
result = runner.invoke(cli, manual_param, input='\n'.join(['card0', "25"]))
logger.debug(result.output)
assert result.exception
assert result.exit_code == 1 # should be permission denied for non-root

0 comments on commit 2523460

Please sign in to comment.