diff options
author | David Lord <davidism@gmail.com> | 2020-04-14 09:55:50 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2020-04-14 16:05:18 -0700 |
commit | 228b7b1b2f26e98b82ae43aee1576cf5aa1322ea (patch) | |
tree | b1bececcf0c856eecad938694c86b0af05926772 /tests | |
parent | e085f3eedf94fe42391aaa9fc349927f8feaa367 (diff) | |
download | itsdangerous-228b7b1b2f26e98b82ae43aee1576cf5aa1322ea.tar.gz |
remove _compat module
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_itsdangerous/test_compat.py | 11 | ||||
-rw-r--r-- | tests/test_itsdangerous/test_serializer.py | 2 |
2 files changed, 1 insertions, 12 deletions
diff --git a/tests/test_itsdangerous/test_compat.py b/tests/test_itsdangerous/test_compat.py deleted file mode 100644 index 2043fad..0000000 --- a/tests/test_itsdangerous/test_compat.py +++ /dev/null @@ -1,11 +0,0 @@ -import pytest - -from itsdangerous._compat import _constant_time_compare - - -@pytest.mark.parametrize( - ("a", "b", "expect"), - ((b"a", b"a", True), (b"a", b"b", False), (b"a", b"aa", False)), -) -def test_python_constant_time_compare(a, b, expect): - assert _constant_time_compare(a, b) == expect diff --git a/tests/test_itsdangerous/test_serializer.py b/tests/test_itsdangerous/test_serializer.py index e783c20..18b0fe6 100644 --- a/tests/test_itsdangerous/test_serializer.py +++ b/tests/test_itsdangerous/test_serializer.py @@ -13,7 +13,7 @@ from itsdangerous.serializer import Serializer def coerce_str(ref, s): - if not isinstance(s, type(ref)): + if isinstance(ref, bytes): return s.encode("utf8") return s |