mirror of
https://github.com/python/cpython.git
synced 2025-09-18 06:30:38 +00:00
bpo-44491: Allow clearing the sqlite3 authoriser callback (GH-26863)
This commit is contained in:
parent
18ba1ff6a4
commit
b19f455339
6 changed files with 33 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue