mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
28 lines
836 B
Python
28 lines
836 B
Python
import unittest
|
|
from slpkg.checks import Check
|
|
from slpkg.configs import Configs
|
|
|
|
|
|
class TestPkgInstalled(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
self.check = Check()
|
|
self.configs = Configs()
|
|
self.file_pattern = f'*{self.configs.sbo_repo_tag}'
|
|
self.packages = ['fish', 'ranger', 'pycharm']
|
|
|
|
def test_check_exists(self):
|
|
self.assertIsNone(self.check.is_package_exists(self.packages))
|
|
|
|
def test_check_unsupported(self):
|
|
self.assertIsNone(self.check.is_package_unsupported(self.packages))
|
|
|
|
def test_check_installed(self):
|
|
self.assertListEqual(self.packages, self.check.is_installed(self.packages, self.file_pattern))
|
|
|
|
def test_check_blacklist(self):
|
|
self.assertIsNone(self.check.is_blacklist(self.packages))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|