Updated for tests

This commit is contained in:
Dimitris Zlatanidis 2023-04-17 10:56:42 +03:00
parent 2b35fe5a71
commit a80e18b4aa
3 changed files with 6 additions and 7 deletions

View file

@ -22,7 +22,7 @@ class TestConfigs(unittest.TestCase):
self.assertEqual('database.slpkg', self.configs.database_name)
self.assertEqual('.pkgs', self.configs.file_list_suffix)
self.assertEqual('upgradepkg --install-new', self.configs.installpkg)
self.assertEqual('upgradepkg --reinstall', self.configs.reinstall)
self.assertEqual('upgradepkg --install-new --reinstall', self.configs.reinstall)
self.assertEqual('removepkg', self.configs.removepkg)
self.assertEqual(True, self.configs.colors)
self.assertEqual(True, self.configs.dialog)
@ -38,8 +38,7 @@ class TestConfigs(unittest.TestCase):
self.assertEqual('*', self.configs.file_pattern)
self.assertEqual('pixel', self.configs.progress_spinner)
self.assertEqual('green', self.configs.spinner_color)
self.assertEqual('', self.configs.http_proxy_address)
self.assertEqual('', self.configs.socks_proxy_address)
self.assertEqual('', self.configs.proxy_address)
self.assertEqual('', self.configs.proxy_username)
self.assertEqual('', self.configs.proxy_password)

View file

@ -17,7 +17,7 @@ class TestSBoQueries(unittest.TestCase):
def test_sources_x86(self):
self.assertEqual(['https://gitlab.com/dslackw/slpkg/-/archive'
'/4.7.6/slpkg-4.7.6.tar.gz'], self.data[self.name][3].split())
'/4.7.8/slpkg-4.7.8.tar.gz'], self.data[self.name][3].split())
def test_sources_x86_64(self):
self.assertEqual([], self.data[self.name][4].split())
@ -26,10 +26,10 @@ class TestSBoQueries(unittest.TestCase):
self.assertEqual(['SQLAlchemy', 'python3-pythondialog', 'python3-progress'], self.data[self.name][7].split())
def test_version(self):
self.assertEqual('4.7.6', self.data[self.name][2])
self.assertEqual('4.7.8', self.data[self.name][2])
def test_checksum_x86(self):
self.assertListEqual(['26577e39fa7f58d9fa24fa24d91d1012'], self.data[self.name][5].split())
self.assertListEqual(['d0ba1c826dc691ceec1ad12603e51330'], self.data[self.name][5].split())
def test_checksum_x86_64(self):
self.assertListEqual([], self.data[self.name][6].split())

View file

@ -44,7 +44,7 @@ class TestUtilities(unittest.TestCase):
['-k', '-p', '-P', '--parallel', '--bin-repo']))
def test_get_file_size(self):
self.assertEqual('2154 KB', self.utils.get_file_size(Path('/var/log/packages/', self.package)))
self.assertEqual('2 MB', self.utils.get_file_size(Path('/var/log/packages/', self.package)))
def test_apply_package_pattern(self):
self.assertGreater(len(self.utils.apply_package_pattern(self.data, ['*'])), 1)