Added test for upgrade packages

This commit is contained in:
Dimitris Zlatanidis 2023-04-04 10:42:30 +03:00
parent 1864fde69e
commit 057b3b4600

23
tests/test_upgrade.py Normal file
View file

@ -0,0 +1,23 @@
import unittest
from slpkg.utilities import Utilities
from slpkg.upgrade import Upgrade
class TestUtilities(unittest.TestCase):
def setUp(self):
self.utils = Utilities()
self.packages: list = ['git', 'wget', 'vim', 'pycharm', 'libreoffice', 'ptpython', 'ranger', 'colored']
def test_installed_is_upgradable_for_binaries(self):
for pkg in self.packages:
self.assertFalse(False, Upgrade(['-B', '--bin-repo='], 'slack_patches').is_package_upgradeable(pkg))
def test_installed_is_upgradable_for_slackbuilds(self):
for pkg in self.packages:
self.assertFalse(False, Upgrade([]).is_package_upgradeable(pkg))
if __name__ == '__main__':
unittest.main()