Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Clinical-Genomics_statina /tests /crud /find /test_batches.py
| from mongomock import MongoClient | |
| from statina.adapter.plugin import StatinaAdapter | |
| from statina.crud.find.batches import get_batch_ids_by_dataset | |
| def test_get_batch_ids_by_dataset(database): | |
| # GIVEN a database with two batches belonging to "dataset_1" and one to "dataset_2" | |
| adapter = StatinaAdapter(database.client, db_name="testdb") | |
| adapter.batch_collection.insert_many( | |
| [ | |
| {"batch_id": "batch_1", "dataset": "dataset_1"}, | |
| {"batch_id": "batch_2", "dataset": "dataset_1"}, | |
| {"batch_id": "batch_3", "dataset": "dataset_2"}, | |
| ] | |
| ) | |
| # WHEN fetching batch_ids for "dataset_1" | |
| batch_ids = get_batch_ids_by_dataset(adapter=adapter, dataset_name="dataset_1") | |
| # THEN only the two batch_ids belonging to "dataset_1" should be returned | |
| assert batch_ids == ["batch_1", "batch_2"] | |
Xet Storage Details
- Size:
- 854 Bytes
- Xet hash:
- b1220606c137aab797ac4c4043d2d7590c7acc0744fba9698fed2e4b971ca112
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.