aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2023-03-27 18:53:19 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2023-03-27 19:01:34 +0100
commitb4e8115ec719e8852ccef852b7a8a06ec34b81db (patch)
tree068049670f14d5f7877af7ce701132b31194beee /tests
parent7de2f2fcf233c1e935c5bc9d8c97bcaf075d0f8b (diff)
downloadpaste-b4e8115ec719e8852ccef852b7a8a06ec34b81db.tar.gz
paste-b4e8115ec719e8852ccef852b7a8a06ec34b81db.tar.xz
paste-b4e8115ec719e8852ccef852b7a8a06ec34b81db.zip
paste.db: readd missing import of sha256
Diffstat (limited to 'tests')
-rw-r--r--tests/test_db.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_db.py b/tests/test_db.py
index d1b269a..5c973ab 100644
--- a/tests/test_db.py
+++ b/tests/test_db.py
@@ -51,3 +51,9 @@ def test_hash_behaves_normally(unmigrated_conn, a, b, expected):
"SELECT DATA_HASH(?) == DATA_HASH(?)", (a, b)
).fetchone()
assert res == (1 if expected else 0)
+
+
+@pytest.mark.parametrize("a,b,expected", hash_testdata)
+def test_sha256_behaves_normally(unmigrated_conn, a, b, expected):
+ (res,) = unmigrated_conn.execute("SELECT SHA256(?) == SHA256(?)", (a, b)).fetchone()
+ assert res == (1 if expected else 0)