blob: 2043fadf5a65c8bcc0c177ca8829080aa43a9c2f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
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
|