Skip to content

Commit

Permalink
use __name__ rather than string of fixtures to make sure they exist
Browse files Browse the repository at this point in the history
  • Loading branch information
sherwoodf committed Feb 26, 2025
1 parent 52d9550 commit f8167e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bia-ingest/test/test_bia_ingest_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
mock_annotation_method,
mock_file_reference,
)
from .conftest import mock_request_get

runner = CliRunner()

Expand Down Expand Up @@ -45,7 +46,7 @@ def expected_objects() -> tuple[dict, int]:
return expected_objects_dict, n_expected_objects


@pytest.mark.usefixtures("mock_request_get")
@pytest.mark.usefixtures(mock_request_get.__name__)
def test_cli_writes_expected_files(
monkeypatch,
test_submission,
Expand Down
4 changes: 2 additions & 2 deletions bia-ingest/test/test_order_of_processing_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mock_file_reference,
)
from bia_ingest import persistence_strategy

from .conftest import mock_request_get

def _modify_annotation_file_list(
submission: api.Submission, file_list_path: str
Expand Down Expand Up @@ -99,7 +99,7 @@ def study_component_and_unique_annotation_file_references(
return file_references


@pytest.mark.usefixtures("mock_request_get")
@pytest.mark.usefixtures(mock_request_get.__name__)
@pytest.mark.parametrize(
"submission_fixture, expected_file_references_fixture",
[
Expand Down

0 comments on commit f8167e4

Please sign in to comment.