craftbeerpi4-pione/tests/test_cli.py
2019-08-16 21:36:55 +02:00

20 lines
No EOL
481 B
Python

import logging
import unittest
from cli import add, remove, list_plugins
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(name)s - %(message)s')
class CLITest(unittest.TestCase):
def test_install(self):
assert add("cbpi4-ui-plugin") == True
assert add("cbpi4-ui-plugin") == False
assert remove("cbpi4-ui-plugin") == True
def test_list(self):
list_plugins()
if __name__ == '__main__':
unittest.main()