2022-04-24 19:59:47 +02:00
|
|
|
import unittest
|
2020-02-17 17:14:24 +01:00
|
|
|
from slpkg.binary.search import search_pkg
|
|
|
|
from slpkg.sbo.search import sbo_search_pkg
|
|
|
|
|
|
|
|
|
2022-04-24 19:59:47 +02:00
|
|
|
class TestFindPkg(unittest.TestCase):
|
2020-02-17 17:14:24 +01:00
|
|
|
|
2022-04-24 19:59:47 +02:00
|
|
|
def test_search(self):
|
|
|
|
"""Testing found the name from binaries repos
|
|
|
|
"""
|
|
|
|
name = "vlc"
|
|
|
|
repo = "alien"
|
|
|
|
test = search_pkg(name, repo)
|
|
|
|
self.assertEqual(name, test)
|
2020-02-26 21:51:49 +01:00
|
|
|
|
2022-04-24 19:59:47 +02:00
|
|
|
def test_sbo_search(self):
|
|
|
|
"""Testing found the name from binaries repos
|
|
|
|
"""
|
|
|
|
name = "slpkg"
|
|
|
|
test = sbo_search_pkg(name).split("/")[-2]
|
|
|
|
self.assertEqual(name, test)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
unittest.main()
|