bpo-44491: Allow clearing the sqlite3 authoriser callback (GH-26863)

This commit is contained in:
Erlend Egeberg Aasland 2021-06-24 16:35:57 +02:00 committed by GitHub
parent 18ba1ff6a4
commit b19f455339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 6 deletions

View file

@ -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):