diff --git a/tests/test_file_size.py b/tests/test_file_size.py index c6865c7f..a40d08dc 100644 --- a/tests/test_file_size.py +++ b/tests/test_file_size.py @@ -2,6 +2,8 @@ from slpkg.file_size import FileSize def test_FileSize(): + """Testing the remote and local servers + """ url = "https://mirrors.slackware.com/slackware/slackware64-14.2/ChangeLog.txt" lc = "tests/test_units.py" fs1 = FileSize(url) diff --git a/tests/test_md5sum.py b/tests/test_md5sum.py index 1ce622c8..cf1590ff 100644 --- a/tests/test_md5sum.py +++ b/tests/test_md5sum.py @@ -2,10 +2,14 @@ from slpkg.md5sum import md5 def test_md5_superuser(): + """Testing checksum for superuser.py file + """ result = md5('slpkg/superuser.py') assert result == "c6a3576c247bda199c75b43540bfc3d7" def test_md5_security(): + """Testing checksum for security.py file + """ result = md5('slpkg/security.py') assert result == "eb8dbea4dec6d72353d30475670389f0" diff --git a/tests/test_search_package.py b/tests/test_search_package.py new file mode 100644 index 00000000..57e40a91 --- /dev/null +++ b/tests/test_search_package.py @@ -0,0 +1,19 @@ +from slpkg.binary.search import search_pkg +from slpkg.sbo.search import sbo_search_pkg + + +def test_search(): + """Testing found the name from binaries repos + """ + name = "vlc" + repo = "alien" + test = search_pkg(name, repo) + assert name == test + + +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 diff --git a/tests/test_units.py b/tests/test_units.py index 1cb43bdf..d1f0ef53 100644 --- a/tests/test_units.py +++ b/tests/test_units.py @@ -2,4 +2,6 @@ from slpkg.sizes import units def test_units(): + """Testing the units metrics + """ assert ["Kb", "Kb"], ["100", "100"] == units(['100', ['100']]) \ No newline at end of file diff --git a/tests/test_utils.py b/tests/test_utils.py index aa8ab3d7..540d578e 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -2,12 +2,16 @@ from slpkg.utils import Utils def test_dimensional_list(): + """Testing dimesional list util + """ lists = [[1, 2, 3, 4, 5]] utils = Utils() assert [1, 2, 3, 4, 5] == utils.dimensional_list(lists) def test_remove_dbs(): + """Testing removing doubles item from list + """ lists = [1, 2, 3, 3, 4, 5, 2, 1] utils = Utils() assert [1, 2, 3, 4, 5] == utils.remove_dbs(lists) \ No newline at end of file