]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Make sure Notify is hashable
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 2 Dec 2020 04:01:48 +0000 (04:01 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 2 Dec 2020 04:01:48 +0000 (04:01 +0000)
tests/test_connection.py

index 91f84a4117a31246f78649bad61843c55b7a98d7..867b3ce349b06d419a4a860254b3003f9c2a8705 100644 (file)
@@ -423,6 +423,7 @@ def test_notify_handlers(conn):
     assert n.channel == "foo"
     assert n.payload == "n2"
     assert n.pid == conn.pgconn.backend_pid
+    assert hash(n)
 
     with pytest.raises(ValueError):
         conn.remove_notify_handler(cb1)