diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-06-24 16:35:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 15:35:57 +0100 |
commit | b19f45533942e4ad7ddf9d2d94f8b87c6f746bce (patch) | |
tree | bec9f6276d7a24488de0614d64922c4314ffa8a4 /Lib/sqlite3/test/userfunctions.py | |
parent | 18ba1ff6a4eb284aefb8d157d5e574d8326a395d (diff) | |
download | cpython-b19f45533942e4ad7ddf9d2d94f8b87c6f746bce.tar.gz cpython-b19f45533942e4ad7ddf9d2d94f8b87c6f746bce.zip |
bpo-44491: Allow clearing the sqlite3 authoriser callback (GH-26863)
Diffstat (limited to 'Lib/sqlite3/test/userfunctions.py')
-rw-r--r-- | Lib/sqlite3/test/userfunctions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py index dc900f6486f..1ed090e3d92 100644 --- a/Lib/sqlite3/test/userfunctions.py +++ b/Lib/sqlite3/test/userfunctions.py @@ -522,6 +522,12 @@ class AuthorizerTests(unittest.TestCase): self.con.execute("select c2 from t1") self.assertIn('prohibited', str(cm.exception)) + def test_clear_authorizer(self): + self.con.set_authorizer(None) + self.con.execute("select * from t2") + self.con.execute("select c2 from t1") + + class AuthorizerRaiseExceptionTests(AuthorizerTests): @staticmethod def authorizer_cb(action, arg1, arg2, dbname, source): |