From 406f61e6882ad9439d5262231289f6d81d93a2a2 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 24 Apr 2022 20:59:47 +0300 Subject: [PATCH] Switch to unittest Signed-off-by: Dimitris Zlatanidis --- tests/test_search_package.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/tests/test_search_package.py b/tests/test_search_package.py index 2798e28f..52ca9798 100644 --- a/tests/test_search_package.py +++ b/tests/test_search_package.py @@ -1,22 +1,25 @@ -import pytest +import unittest from slpkg.binary.search import search_pkg from slpkg.sbo.search import sbo_search_pkg -@pytest.mark.skip(reason="no way of currently testing in Gitlab") -def test_search(): - """Testing found the name from binaries repos - """ - name = "vlc" - repo = "alien" - test = search_pkg(name, repo) - assert name == test +class TestFindPkg(unittest.TestCase): + + def test_search(self): + """Testing found the name from binaries repos + """ + name = "vlc" + repo = "alien" + test = search_pkg(name, repo) + self.assertEqual(name, test) + + 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) -@pytest.mark.skip(reason="no way of currently testing in Gtilab") -def test_sbo_search(): - """Testing found the name from binaries repos - """ - name = "slpkg" - test = sbo_search_pkg(name).split("/")[-2] - assert name == test \ No newline at end of file +if __name__ == "__main__": + unittest.main()