22from http import HTTPStatus
33
44import httpx
5+ import pytest
56from sqlalchemy import text
67from sqlalchemy .ext .asyncio import AsyncConnection
78
@@ -458,6 +459,7 @@ async def test_get_task_study_by_alias(py_api: httpx.AsyncClient) -> None:
458459 assert response .json () == expected
459460
460461
462+ @pytest .mark .mut
461463async def test_create_task_study (py_api : httpx .AsyncClient ) -> None :
462464 response = await py_api .post (
463465 f"/studies?api_key={ ApiKey .SOME_USER } " ,
@@ -516,6 +518,7 @@ async def _attach_tasks_to_study(
516518 )
517519
518520
521+ @pytest .mark .mut
519522async def test_attach_task_to_study (py_api : httpx .AsyncClient , expdb_test : AsyncConnection ) -> None :
520523 response = await _attach_tasks_to_study (
521524 study_id = 1 ,
@@ -528,6 +531,7 @@ async def test_attach_task_to_study(py_api: httpx.AsyncClient, expdb_test: Async
528531 assert response .json () == {"study_id" : 1 , "main_entity_type" : StudyType .TASK }
529532
530533
534+ @pytest .mark .mut
531535async def test_attach_task_to_study_needs_owner (
532536 py_api : httpx .AsyncClient , expdb_test : AsyncConnection
533537) -> None :
@@ -542,6 +546,7 @@ async def test_attach_task_to_study_needs_owner(
542546 assert response .status_code == HTTPStatus .FORBIDDEN , response .content
543547
544548
549+ @pytest .mark .mut
545550async def test_attach_task_to_study_already_linked_raises (
546551 py_api : httpx .AsyncClient ,
547552 expdb_test : AsyncConnection ,
@@ -561,6 +566,7 @@ async def test_attach_task_to_study_already_linked_raises(
561566 assert error ["detail" ] == "Task 1 is already attached to study 1."
562567
563568
569+ @pytest .mark .mut
564570async def test_attach_task_to_study_but_task_not_exist_raises (
565571 py_api : httpx .AsyncClient ,
566572 expdb_test : AsyncConnection ,
0 commit comments