2022-06-21 17:40:06 +02:00
|
|
|
import unittest
|
|
|
|
from slpkg.checks import Check
|
2023-05-13 16:51:44 +02:00
|
|
|
from slpkg.sbos.queries import SBoQueries
|
2022-06-21 17:40:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
class TestPkgInstalled(unittest.TestCase):
|
|
|
|
|
|
|
|
def setUp(self):
|
2023-05-13 16:51:44 +02:00
|
|
|
self.bin_queries = SBoQueries('sbo')
|
2023-04-09 19:38:17 +02:00
|
|
|
self.data = self.bin_queries.repository_data()
|
2023-05-13 16:51:44 +02:00
|
|
|
self.check = Check('sbo', self.data)
|
|
|
|
self.packages = ['audacity', 'Flask', 'awscli']
|
2022-06-21 17:40:06 +02:00
|
|
|
|
|
|
|
def test_check_exists(self):
|
2023-05-08 13:07:37 +02:00
|
|
|
self.assertIsNone(self.check.package_exists_in_the_database(self.packages))
|
2022-06-21 17:40:06 +02:00
|
|
|
|
2022-12-22 22:00:42 +01:00
|
|
|
def test_check_unsupported(self):
|
2023-03-15 18:16:14 +01:00
|
|
|
self.assertIsNone(self.check.is_package_unsupported(self.packages))
|
2022-06-21 17:40:06 +02:00
|
|
|
|
2023-04-03 16:55:22 +02:00
|
|
|
def test_check_is_installed(self):
|
2023-05-13 16:51:44 +02:00
|
|
|
self.assertIsNone(self.check.is_package_installed(self.packages))
|
2023-04-03 16:55:22 +02:00
|
|
|
|
2022-06-21 17:40:06 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
unittest.main()
|