feat: Raise exception in tests when blocking code is called in event loop (#4293)
Raise exception in tests when blocking code is called in event loop
This commit is contained in:
parent
df22924b0e
commit
14b3117d6b
13 changed files with 596 additions and 46 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import asyncio
|
||||
import json
|
||||
from typing import NamedTuple
|
||||
from uuid import UUID, uuid4
|
||||
|
|
@ -604,7 +605,7 @@ async def test_delete_nonexistent_flow(client: AsyncClient, logged_in_headers):
|
|||
@pytest.mark.usefixtures("active_user")
|
||||
async def test_read_only_starter_projects(client: AsyncClient, logged_in_headers):
|
||||
response = await client.get("api/v1/flows/basic_examples/", headers=logged_in_headers)
|
||||
starter_projects = load_starter_projects()
|
||||
starter_projects = await asyncio.to_thread(load_starter_projects)
|
||||
assert response.status_code == 200
|
||||
assert len(response.json()) == len(starter_projects)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue