mirror of
https://github.com/simonw/datasette.git
synced 2026-09-18 06:24:18 +02:00
Fix CREATE VIEW analysis on Python 3.10
This commit is contained in:
parent
6473a7ecb0
commit
d06737b6f4
2 changed files with 15 additions and 3 deletions
|
|
@ -439,7 +439,7 @@ def test_analyze_attached_database_tables(conn):
|
|||
}
|
||||
|
||||
|
||||
def test_analyze_clears_authorizer_on_error():
|
||||
def test_analyze_disables_authorizer_on_error():
|
||||
class FakeConnection:
|
||||
def __init__(self):
|
||||
self.authorizers = []
|
||||
|
|
@ -455,4 +455,5 @@ def test_analyze_clears_authorizer_on_error():
|
|||
with pytest.raises(sqlite3.OperationalError):
|
||||
analyze_sql_tables(conn, "bad SQL")
|
||||
|
||||
assert conn.authorizers[-1] is None
|
||||
final_authorizer = conn.authorizers[-1]
|
||||
assert final_authorizer is None or final_authorizer() == sqlite3.SQLITE_OK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue