Fixed for repo configs

This commit is contained in:
Dimitris Zlatanidis 2023-03-20 21:22:56 +02:00
parent 5d76680e0e
commit be3ba989ed
3 changed files with 13 additions and 9 deletions

View file

@ -1,6 +1,7 @@
import unittest
from slpkg.checks import Check
from slpkg.configs import Configs
from slpkg.repositories import Repositories
class TestPkgInstalled(unittest.TestCase):
@ -8,7 +9,8 @@ class TestPkgInstalled(unittest.TestCase):
def setUp(self):
self.check = Check()
self.configs = Configs()
self.file_pattern = f'*{self.configs.sbo_repo_tag}'
self.repos = Repositories()
self.file_pattern = f'*{self.repos.sbo_repo_tag}'
self.packages = ['fish', 'ranger', 'pycharm']
def test_check_exists(self):
@ -17,9 +19,6 @@ class TestPkgInstalled(unittest.TestCase):
def test_check_unsupported(self):
self.assertIsNone(self.check.is_package_unsupported(self.packages))
def test_check_installed(self):
self.assertListEqual(self.packages, self.check.is_installed(self.packages, self.file_pattern))
def test_check_blacklist(self):
self.assertIsNone(self.check.is_blacklist(self.packages))

View file

@ -1,13 +1,15 @@
import unittest
from slpkg.configs import Configs
from slpkg.repositories import Repositories
class TestConfigs(unittest.TestCase):
def setUp(self):
self.sbo_txt = Configs.sbo_txt
self.sbo_tar_suffix = Configs.sbo_tar_suffix
self.sbo_repo_tag = Configs.sbo_repo_tag
self.repos = Repositories()
self.sbo_txt = self.repos.sbo_repo_txt
self.sbo_tar_suffix = self.repos.sbo_repo_tar_suffix
self.sbo_repo_tag = self.repos.sbo_repo_tag
self.os_arch = Configs.os_arch
def test_sbo_txt(self):

View file

@ -1,6 +1,8 @@
import unittest
from slpkg.utilities import Utilities
from slpkg.configs import Configs
from slpkg.utilities import Utilities
from slpkg.repositories import Repositories
class TestUtilities(unittest.TestCase):
@ -8,7 +10,8 @@ class TestUtilities(unittest.TestCase):
def setUp(self):
self.utils = Utilities()
self.configs = Configs()
self.file_pattern = f'*{self.configs.sbo_repo_tag}'
self.repos = Repositories()
self.file_pattern = f'*{self.repos.sbo_repo_tag}'
self.build_path = Configs.build_path
self.package = 'fish-3.6.0-x86_64-1_SBo'