mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-07 08:46:21 +01:00
Added some pytest
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
80be208729
commit
a3605544f6
1 changed files with 8 additions and 0 deletions
|
@ -33,3 +33,11 @@ def md5(source):
|
|||
with open(source, "rb") as file_to_check:
|
||||
data = file_to_check.read()
|
||||
return hashlib.md5(data).hexdigest()
|
||||
|
||||
|
||||
def test_md5(source="superuser.py"):
|
||||
"""Testing hashing with pytest"""
|
||||
source = source.replace("%2B", "+")
|
||||
with open(source, "rb") as file_to_check:
|
||||
data = file_to_check.read()
|
||||
assert hashlib.md5(data).hexdigest() == "e6cebdf37fbc1b8e9d3c5e3e53b300c1"
|
||||
|
|
Loading…
Add table
Reference in a new issue