slpkg/tests/test_sbo_queries.py

47 lines
1.4 KiB
Python
Raw Normal View History

2022-06-21 19:46:20 +02:00
import unittest
2024-03-21 17:33:33 +01:00
from slpkg.load_data import LoadData
2022-06-21 19:46:20 +02:00
class TestSBoQueries(unittest.TestCase):
def setUp(self):
2024-03-21 17:33:33 +01:00
load = LoadData()
self.data: dict = load.load('sbo')
2023-04-09 19:38:17 +02:00
self.name: str = 'slpkg'
2022-06-21 19:46:20 +02:00
def test_slackbuild(self):
2023-04-09 19:38:17 +02:00
self.assertTrue(True, self.data[self.name])
2022-06-21 19:46:20 +02:00
def test_location(self):
2023-05-13 16:51:44 +02:00
self.assertEqual('system', self.data[self.name]['location'])
2022-06-21 19:46:20 +02:00
2023-04-09 19:38:17 +02:00
def test_sources_x86(self):
2022-12-22 22:55:45 +01:00
self.assertEqual(['https://gitlab.com/dslackw/slpkg/-/archive'
2024-03-21 17:33:33 +01:00
'/4.9.8/slpkg-4.9.8.tar.gz'], self.data[self.name]['download'])
2023-04-09 19:38:17 +02:00
def test_sources_x86_64(self):
2024-03-21 17:33:33 +01:00
self.assertEqual([], self.data[self.name]['download64'])
2022-06-21 19:46:20 +02:00
def test_requires(self):
2024-04-02 20:53:47 +02:00
self.assertEqual(['python3-build', 'python3-pythondialog'],
2024-03-21 17:33:33 +01:00
self.data[self.name]['requires'])
2022-06-21 19:46:20 +02:00
def test_version(self):
2024-04-02 20:53:47 +02:00
self.assertEqual('5.0.4', self.data[self.name]['version'])
2023-04-09 19:38:17 +02:00
def test_checksum_x86(self):
2024-03-21 17:33:33 +01:00
self.assertListEqual(['9f9cf626d7246202886774c6cbc2cccf'], self.data[self.name]['md5sum'])
2022-06-21 19:46:20 +02:00
2023-04-09 19:38:17 +02:00
def test_checksum_x86_64(self):
2024-03-21 17:33:33 +01:00
self.assertListEqual([], self.data[self.name]['md5sum64'])
2022-06-21 19:46:20 +02:00
def test_files(self):
2024-03-21 17:33:33 +01:00
self.assertEqual(5, len(self.data[self.name]['files']))
2022-06-21 19:46:20 +02:00
def test_description(self):
2023-05-13 16:51:44 +02:00
self.assertEqual('slpkg (Slackware Packaging Tool)', self.data[self.name]['description'])
2022-06-21 19:46:20 +02:00
if __name__ == '__main__':
unittest.main()