|
9 | 9 | import datetime |
10 | 10 | import random |
11 | 11 | from collections.abc import Awaitable, Callable |
12 | | -from typing import cast |
| 12 | +from typing import Any, cast |
13 | 13 |
|
14 | 14 | import arrow |
15 | 15 | import pytest |
@@ -56,6 +56,7 @@ async def test_get( |
56 | 56 | fake_project_id: ProjectID, |
57 | 57 | publish_project: Callable[[], Awaitable[PublishedProject]], |
58 | 58 | create_comp_run: Callable[..., Awaitable[CompRunsAtDB]], |
| 59 | + product_db: dict[str, Any], |
59 | 60 | ): |
60 | 61 | with pytest.raises(ComputationalRunNotFoundError): |
61 | 62 | await CompRunsRepository(sqlalchemy_async_engine).get( |
@@ -88,6 +89,7 @@ async def test_list( |
88 | 89 | publish_project: Callable[[], Awaitable[PublishedProject]], |
89 | 90 | run_metadata: RunMetadataDict, |
90 | 91 | faker: Faker, |
| 92 | + product_db: dict[str, Any], |
91 | 93 | ): |
92 | 94 | assert await CompRunsRepository(sqlalchemy_async_engine).list_() == [] |
93 | 95 |
|
@@ -269,6 +271,7 @@ async def test_create( |
269 | 271 | run_metadata: RunMetadataDict, |
270 | 272 | faker: Faker, |
271 | 273 | publish_project: Callable[[], Awaitable[PublishedProject]], |
| 274 | + product_db: dict[str, Any], |
272 | 275 | ): |
273 | 276 | with pytest.raises(ProjectNotFoundError): |
274 | 277 | await CompRunsRepository(sqlalchemy_async_engine).create( |
@@ -331,6 +334,7 @@ async def test_update( |
331 | 334 | run_metadata: RunMetadataDict, |
332 | 335 | faker: Faker, |
333 | 336 | publish_project: Callable[[], Awaitable[PublishedProject]], |
| 337 | + product_db: dict[str, Any], |
334 | 338 | ): |
335 | 339 | # this updates nothing but also does not complain |
336 | 340 | updated = await CompRunsRepository(sqlalchemy_async_engine).update( |
@@ -371,6 +375,7 @@ async def test_set_run_result( |
371 | 375 | run_metadata: RunMetadataDict, |
372 | 376 | faker: Faker, |
373 | 377 | publish_project: Callable[[], Awaitable[PublishedProject]], |
| 378 | + product_db: dict[str, Any], |
374 | 379 | ): |
375 | 380 | published_project = await publish_project() |
376 | 381 | created = await CompRunsRepository(sqlalchemy_async_engine).create( |
@@ -419,6 +424,7 @@ async def test_mark_for_cancellation( |
419 | 424 | run_metadata: RunMetadataDict, |
420 | 425 | faker: Faker, |
421 | 426 | publish_project: Callable[[], Awaitable[PublishedProject]], |
| 427 | + product_db: dict[str, Any], |
422 | 428 | ): |
423 | 429 | published_project = await publish_project() |
424 | 430 | created = await CompRunsRepository(sqlalchemy_async_engine).create( |
@@ -451,6 +457,7 @@ async def test_mark_for_scheduling( |
451 | 457 | run_metadata: RunMetadataDict, |
452 | 458 | faker: Faker, |
453 | 459 | publish_project: Callable[[], Awaitable[PublishedProject]], |
| 460 | + product_db: dict[str, Any], |
454 | 461 | ): |
455 | 462 | published_project = await publish_project() |
456 | 463 | created = await CompRunsRepository(sqlalchemy_async_engine).create( |
@@ -485,6 +492,7 @@ async def test_mark_scheduling_done( |
485 | 492 | run_metadata: RunMetadataDict, |
486 | 493 | faker: Faker, |
487 | 494 | publish_project: Callable[[], Awaitable[PublishedProject]], |
| 495 | + product_db: dict[str, Any], |
488 | 496 | ): |
489 | 497 | published_project = await publish_project() |
490 | 498 | created = await CompRunsRepository(sqlalchemy_async_engine).create( |
|
0 commit comments