33from ...models import Studyset , User
44
55
6- def test_post_blank_annotation (auth_client , ingest_neurosynth ):
6+ def test_post_blank_annotation (auth_client , ingest_neurosynth , session ):
77 dset = Studyset .query .first ()
88 payload = {
99 "studyset" : dset .id ,
@@ -17,7 +17,7 @@ def test_post_blank_annotation(auth_client, ingest_neurosynth):
1717 )
1818
1919
20- def test_post_annotation (auth_client , ingest_neurosynth ):
20+ def test_post_annotation (auth_client , ingest_neurosynth , session ):
2121 dset = Studyset .query .first ()
2222 # y for x in non_flat for y in x
2323 data = [
@@ -37,7 +37,7 @@ def test_post_annotation(auth_client, ingest_neurosynth):
3737
3838# for some reason output is no longer valid
3939@pytest .mark .xfail
40- def test_get_annotations (auth_client , ingest_neurosynth ):
40+ def test_get_annotations (auth_client , ingest_neurosynth , session ):
4141 import pandas as pd
4242 from io import StringIO
4343
@@ -59,7 +59,7 @@ def test_get_annotations(auth_client, ingest_neurosynth):
5959 assert isinstance (df , pd .DataFrame )
6060
6161
62- def test_clone_annotation (auth_client , simple_neurosynth_annotation ):
62+ def test_clone_annotation (auth_client , simple_neurosynth_annotation , session ):
6363 annotation_entry = simple_neurosynth_annotation
6464 resp = auth_client .post (
6565 f"/api/annotations/?source_id={ annotation_entry .id } " , data = {}
@@ -71,7 +71,7 @@ def test_clone_annotation(auth_client, simple_neurosynth_annotation):
7171 assert data ["source" ] == "neurostore"
7272
7373
74- def test_single_analysis_delete (auth_client , user_data ):
74+ def test_single_analysis_delete (auth_client , user_data , session ):
7575 user = User .query .filter_by (name = "user1" ).first ()
7676 # get relevant studyset
7777 studysets = auth_client .get (f"/api/studysets/?user_id={ user .external_id } " )
@@ -215,7 +215,7 @@ def test_analysis_addition_to_studyset(auth_client, session, user_data):
215215 )
216216
217217
218- def test_mismatched_notes (auth_client , ingest_neurosynth ):
218+ def test_mismatched_notes (auth_client , ingest_neurosynth , session ):
219219 dset = Studyset .query .first ()
220220 # y for x in non_flat for y in x
221221 data = [
@@ -249,7 +249,7 @@ def test_mismatched_notes(auth_client, ingest_neurosynth):
249249
250250# test push analysis id that does not exist
251251# Handle error better
252- def test_put_nonexistent_analysis (auth_client , ingest_neurosynth ):
252+ def test_put_nonexistent_analysis (auth_client , ingest_neurosynth , session ):
253253 dset = Studyset .query .first ()
254254 # y for x in non_flat for y in x
255255 data = [
@@ -281,7 +281,7 @@ def test_put_nonexistent_analysis(auth_client, ingest_neurosynth):
281281 )
282282
283283
284- def test_correct_note_overwrite (auth_client , ingest_neurosynth ):
284+ def test_correct_note_overwrite (auth_client , ingest_neurosynth , session ):
285285 dset = Studyset .query .first ()
286286 # y for x in non_flat for y in x
287287 data = [
0 commit comments