Formatting
This commit is contained in:
parent
fd7da8720f
commit
39434eadc4
58 changed files with 630 additions and 1027 deletions
|
|
@ -38,9 +38,7 @@ def test_create_or_update_starter_projects(client):
|
|||
num_projects = len(load_starter_projects())
|
||||
|
||||
# Get the number of projects in the database
|
||||
num_db_projects = session.exec(
|
||||
select(func.count(Flow.id)).where(Flow.folder == STARTER_FOLDER_NAME)
|
||||
).one()
|
||||
num_db_projects = session.exec(select(func.count(Flow.id)).where(Flow.folder == STARTER_FOLDER_NAME)).one()
|
||||
|
||||
# Check that the number of projects in the database is the same as the number of projects returned by load_starter_projects
|
||||
assert num_db_projects == num_projects
|
||||
|
|
@ -56,21 +54,16 @@ async def test_starter_project_can_run_successfully(client):
|
|||
num_projects = len(load_starter_projects())
|
||||
|
||||
# Get the number of projects in the database
|
||||
num_db_projects = session.exec(
|
||||
select(func.count(Flow.id)).where(Flow.folder == STARTER_FOLDER_NAME)
|
||||
).one()
|
||||
num_db_projects = session.exec(select(func.count(Flow.id)).where(Flow.folder == STARTER_FOLDER_NAME)).one()
|
||||
|
||||
# Check that the number of projects in the database is the same as the number of projects returned by load_starter_projects
|
||||
assert num_db_projects == num_projects
|
||||
|
||||
# Get all the starter projects
|
||||
projects = session.exec(
|
||||
select(Flow).where(Flow.folder == STARTER_FOLDER_NAME)
|
||||
).all()
|
||||
projects = session.exec(select(Flow).where(Flow.folder == STARTER_FOLDER_NAME)).all()
|
||||
|
||||
graphs: list[Graph] = [
|
||||
(project.name, Graph.from_payload(project.data, flow_id=project.id))
|
||||
for project in projects
|
||||
(project.name, Graph.from_payload(project.data, flow_id=project.id)) for project in projects
|
||||
]
|
||||
assert len(graphs) == len(projects)
|
||||
for name, graph in graphs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue