mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
import unittest
|
|
|
|
from slpkg.load_data import LoadData
|
|
|
|
class TestSBoQueries(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
load = LoadData()
|
|
self.data: dict = load.load('sbo')
|
|
self.name: str = 'slpkg'
|
|
|
|
def test_slackbuild(self):
|
|
self.assertTrue(True, self.data[self.name])
|
|
|
|
def test_location(self):
|
|
self.assertEqual('system', self.data[self.name]['location'])
|
|
|
|
def test_sources_x86(self):
|
|
self.assertEqual(['https://gitlab.com/dslackw/slpkg/-/archive'
|
|
'/4.9.8/slpkg-4.9.8.tar.gz'], self.data[self.name]['download'])
|
|
|
|
def test_sources_x86_64(self):
|
|
self.assertEqual([], self.data[self.name]['download64'])
|
|
|
|
def test_requires(self):
|
|
self.assertEqual(['python3-build', 'python3-pythondialog'],
|
|
self.data[self.name]['requires'])
|
|
|
|
def test_version(self):
|
|
self.assertEqual('5.0.4', self.data[self.name]['version'])
|
|
|
|
def test_checksum_x86(self):
|
|
self.assertListEqual(['9f9cf626d7246202886774c6cbc2cccf'], self.data[self.name]['md5sum'])
|
|
|
|
def test_checksum_x86_64(self):
|
|
self.assertListEqual([], self.data[self.name]['md5sum64'])
|
|
|
|
def test_files(self):
|
|
self.assertEqual(5, len(self.data[self.name]['files']))
|
|
|
|
def test_description(self):
|
|
self.assertEqual('slpkg (Slackware Packaging Tool)', self.data[self.name]['description'])
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|