mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated tests
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
830f54b069
commit
0c1ef40bd0
3 changed files with 23 additions and 19 deletions
|
@ -1,6 +1,4 @@
|
|||
from slpkg.md5sum import md5
|
||||
from slpkg.sizes import units
|
||||
from slpkg.utils import Utils
|
||||
|
||||
|
||||
def test_md5_superuser():
|
||||
|
@ -11,19 +9,3 @@ def test_md5_superuser():
|
|||
def test_md5_security():
|
||||
result = md5('slpkg/security.py')
|
||||
assert result == "d395d2fcf1c7b1a91ef6ce3dc8eb047b"
|
||||
|
||||
|
||||
def test_units():
|
||||
assert ["Kb", "Kb"], ["100", "100"] == units(['100', ['100']])
|
||||
|
||||
|
||||
def test_dimensional_list():
|
||||
lists = [[1, 2, 3, 4, 5]]
|
||||
utils = Utils()
|
||||
assert [1, 2, 3, 4, 5] == utils.dimensional_list(lists)
|
||||
|
||||
|
||||
def test_remove_dbs():
|
||||
lists = [1, 2, 3, 3, 4, 5, 2, 1]
|
||||
utils = Utils()
|
||||
assert [1, 2, 3, 4, 5] == utils.remove_dbs(lists)
|
5
tests/test_units.py
Normal file
5
tests/test_units.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from slpkg.sizes import units
|
||||
|
||||
|
||||
def test_units():
|
||||
assert ["Kb", "Kb"], ["100", "100"] == units(['100', ['100']])
|
17
tests/test_utils.py
Normal file
17
tests/test_utils.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from slpkg.utils import Utils
|
||||
|
||||
|
||||
def test_units():
|
||||
assert ["Kb", "Kb"], ["100", "100"] == units(['100', ['100']])
|
||||
|
||||
|
||||
def test_dimensional_list():
|
||||
lists = [[1, 2, 3, 4, 5]]
|
||||
utils = Utils()
|
||||
assert [1, 2, 3, 4, 5] == utils.dimensional_list(lists)
|
||||
|
||||
|
||||
def test_remove_dbs():
|
||||
lists = [1, 2, 3, 3, 4, 5, 2, 1]
|
||||
utils = Utils()
|
||||
assert [1, 2, 3, 4, 5] == utils.remove_dbs(lists)
|
Loading…
Reference in a new issue