ref: Make create_or_update_starter_projects async (#5165)

Make create_or_update_starter_projects async
This commit is contained in:
Christophe Bornet 2024-12-10 08:51:35 +01:00 • committed by GitHub
commit fe6ec1690b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 59 additions and 60 deletions

View file

@ -1,4 +1,3 @@
import asyncio
import json
from typing import NamedTuple
from uuid import UUID, uuid4
@ -605,7 +604,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 = await asyncio.to_thread(load_starter_projects)
starter_projects = await load_starter_projects()
assert response.status_code == 200
assert len(response.json()) == len(starter_projects)