diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-07-03 19:27:30 +0000 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-07-03 19:27:30 +0000 |
commit | c463d8b55b7a91b651c2ac4e3e09a25fa0775240 (patch) | |
tree | 26fe2896be81759b9df5b2e8014240c62faf5496 /python/tests/utils_test.py | |
parent | aa0c9ab6b51d182cb78ab4cc75c81c0054765bde (diff) | |
parent | 5d7070d2f365b54ee40e481483f35352cdfe53f5 (diff) |
Merge branch 'python/drop-hypothesis' into 'master'
tests: Drop hypothesis from the python tests.
See merge request matrix-org/olm!5
Diffstat (limited to 'python/tests/utils_test.py')
-rw-r--r-- | python/tests/utils_test.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/python/tests/utils_test.py b/python/tests/utils_test.py index a552d12..86fb34f 100644 --- a/python/tests/utils_test.py +++ b/python/tests/utils_test.py @@ -2,16 +2,16 @@ import base64 import hashlib from future.utils import bytes_to_native_str -from hypothesis import given -from hypothesis.strategies import text from olm import sha256 from olm._compat import to_bytes class TestClass(object): - @given(text(), text()) - def test_sha256(self, input1, input2): + def test_sha256(self): + input1 = "It's a secret to everybody" + input2 = "It's a secret to nobody" + first_hash = sha256(input1) second_hash = sha256(input2) @@ -21,9 +21,5 @@ class TestClass(object): hashlib_hash = bytes_to_native_str(hashlib_hash[:-1]) - if input1 == input2: - assert first_hash == second_hash - else: - assert first_hash != second_hash - + assert first_hash != second_hash assert hashlib_hash == first_hash |