From 16a9082e73f566d706db2c5d92e9f1e2001fee22 Mon Sep 17 00:00:00 2001 From: Christian Oertlin Date: Mon, 8 Apr 2024 15:29:02 +0200 Subject: [PATCH] fix conftest --- tests/conftest.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index ec33f2e..6c0be7d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -94,6 +94,35 @@ def test_analysis(sex_male, timestamp_now: datetime, test_sample_id: str) -> Ana ) +@pytest.fixture +def base_store( + store: Store, + helpers: StoreHelpers, + test_snp: SNP, + test_genotype: Genotype, + test_plate: Plate, + test_user: User, + test_sample: Sample, + test_analysis: Analysis, +): + helpers.ensure_snp(store=store, snp=test_snp) + helpers.ensure_genotype(store=store, genotype=test_genotype) + helpers.ensure_plate( + store=store, + plate=test_plate, + ) + helpers.ensure_sample(store=store, sample=test_sample) + helpers.ensure_analysis( + store=store, + analysis=test_analysis, + ) + helpers.ensure_user( + store=store, + user=test_user, + ) + return store + + @pytest.fixture(name="fixtures_dir") def fixture_fixtures_dir() -> Path: """Return the path to fixtures dir."""