-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled the catalog selection combobox in the run browser.
- Loading branch information
1 parent
b2c706b
commit 3c664a3
Showing
8 changed files
with
93 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,23 +3,35 @@ | |
from firefly.run_browser.client import DatabaseWorker | ||
|
||
|
||
@pytest.fixture() | ||
async def worker(tiled_client): | ||
worker = DatabaseWorker(tiled_client) | ||
await worker.change_catalog("255id_testing") | ||
return worker | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_catalog_names(worker): | ||
assert (await worker.catalog_names()) == ["255id_testing", "255bm_testing"] | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_filter_runs(catalog): | ||
worker = DatabaseWorker(catalog=catalog) | ||
async def test_filter_runs(worker): | ||
runs = await worker.load_all_runs(filters={"plan": "xafs_scan"}) | ||
# Check that the runs were filtered | ||
assert len(runs) == 1 | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_distinct_fields(catalog): | ||
worker = DatabaseWorker(catalog=catalog) | ||
async def test_distinct_fields(worker): | ||
distinct_fields = await worker.load_distinct_fields() | ||
# Check that the dictionary has the right structure | ||
for key in ["sample_name"]: | ||
assert key in distinct_fields.keys() | ||
|
||
|
||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
# :author: Mark Wolfman | ||
# :email: [email protected] | ||
|
Oops, something went wrong.