mirror of
https://github.com/simonw/datasette.git
synced 2026-10-29 22:47:39 +01:00
parent
cf113a5985
commit
e1a4e03635
16 changed files with 24 additions and 47 deletions
|
|
@ -1727,7 +1727,7 @@ async def test_hook_track_event():
|
|||
# Should have a recent created as well
|
||||
created = event.created
|
||||
assert isinstance(created, datetime.datetime)
|
||||
assert created.tzinfo == datetime.timezone.utc
|
||||
assert created.tzinfo == datetime.UTC
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
|
|
@ -455,5 +455,4 @@ def test_analyze_disables_authorizer_on_error():
|
|||
with pytest.raises(sqlite3.OperationalError):
|
||||
analyze_sql_tables(conn, "bad SQL")
|
||||
|
||||
final_authorizer = conn.authorizers[-1]
|
||||
assert final_authorizer is None or final_authorizer() == sqlite3.SQLITE_OK
|
||||
assert conn.authorizers[-1] is None
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ async def test_write_wrapper_set_authorizer(datasette, actor, table, should_deny
|
|||
try:
|
||||
yield
|
||||
finally:
|
||||
conn.set_authorizer(lambda *args: sqlite3.SQLITE_OK)
|
||||
conn.set_authorizer(None)
|
||||
|
||||
return wrapper
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue