From e98df9c97b764420ab5c89b64ed4d7c164e28e50 Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Fri, 2 Oct 2015 22:48:49 +0800 Subject: Move hypothesis tests to the subfolder. --- tests/hypothesis/__init__.py | 5 +++++ tests/hypothesis/test_fernet.py | 11 +++++++++++ tests/test_with_hypothesis.py | 11 ----------- 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 tests/hypothesis/__init__.py create mode 100644 tests/hypothesis/test_fernet.py delete mode 100644 tests/test_with_hypothesis.py (limited to 'tests') diff --git a/tests/hypothesis/__init__.py b/tests/hypothesis/__init__.py new file mode 100644 index 00000000..4b540884 --- /dev/null +++ b/tests/hypothesis/__init__.py @@ -0,0 +1,5 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import absolute_import, division, print_function diff --git a/tests/hypothesis/test_fernet.py b/tests/hypothesis/test_fernet.py new file mode 100644 index 00000000..fd243803 --- /dev/null +++ b/tests/hypothesis/test_fernet.py @@ -0,0 +1,11 @@ +from hypothesis import given +from hypothesis.strategies import binary + +from cryptography.fernet import Fernet + + +@given(binary()) +def test_fernet(data): + f = Fernet(Fernet.generate_key()) + ct = f.encrypt(data) + assert f.decrypt(ct) == data diff --git a/tests/test_with_hypothesis.py b/tests/test_with_hypothesis.py deleted file mode 100644 index fd243803..00000000 --- a/tests/test_with_hypothesis.py +++ /dev/null @@ -1,11 +0,0 @@ -from hypothesis import given -from hypothesis.strategies import binary - -from cryptography.fernet import Fernet - - -@given(binary()) -def test_fernet(data): - f = Fernet(Fernet.generate_key()) - ct = f.encrypt(data) - assert f.decrypt(ct) == data -- cgit v1.2.3