slpkg/tests/test_upgrade.py
Dimitris Zlatanidis 8ff5191990 Pass tests
2024-03-21 18:33:33 +02:00

35 lines
1.3 KiB
Python

import unittest
from slpkg.upgrade import Upgrade
from slpkg.utilities import Utilities
from slpkg.load_data import LoadData
class TestUtilities(unittest.TestCase):
def setUp(self):
self.load = LoadData()
self.utils = Utilities()
self.data: dict = self.load.load('sbo')
def test_installed_is_upgradable_for_sbo_repository(self):
packages: list = ['sbo-create', 'ptpython', 'pycharm', 'powerline-status']
for pkg in packages:
self.assertFalse(False, Upgrade('sbo', self.data).is_package_upgradeable(pkg))
def test_installed_is_upgradable_for_slack_patches_repository(self):
repo: str = 'slack_patches'
data: dict = self.load.load(repo)
packages: list = ['vim', 'httpd', 'seamonkey', 'sudo', 'python3', 'qt5', 'php']
for pkg in packages:
self.assertFalse(False, Upgrade('slack', data).is_package_upgradeable(pkg))
def test_installed_is_upgradable_for_alien_repository(self):
repo: str = 'alien'
data: dict = self.load.load(repo)
packages: list = ['audacity', 'vlc', 'dnspython']
for pkg in packages:
self.assertFalse(False, Upgrade('alien', data).is_package_upgradeable(pkg))
if __name__ == '__main__':
unittest.main()