Skip to content

Commit

Permalink
Remove failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard committed Dec 11, 2023
1 parent 1a4d661 commit da79782
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
6 changes: 3 additions & 3 deletions cg/meta/workflow/microsalt/microsalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def get_case_path(self, case_id: str) -> list[Path]:

def get_latest_case_path(self, case_id: str) -> Path | None:
"""Return latest run dir for a microbial case, if no path found it returns None."""
lims_project: str = self.get_project(
self.status_db.get_case_by_internal_id(internal_id=case_id).links[0].sample.internal_id
)
case: Case = self.status_db.get_case_by_internal_id(case_id)
sample_id: str = case.links[0].sample.internal_id
lims_project: str = self.get_project(sample_id)

return next(
(
Expand Down
23 changes: 0 additions & 23 deletions tests/meta/workflow/test_microsalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,29 +139,6 @@ def test_get_latest_case_path(
assert Path(microsalt_analysis_dir, "ACC12345_2022") == path


def test_get_cases_to_store(
qc_microsalt_context: CGConfig, helpers: StoreHelpers, trailblazer_api: MockTB
):
"""Test that the cases fetched are Microsalt and finished successfully."""
# GIVEN a MicrosaltAPI, a Store and a TrailblazerAPI
analysis_api: MicrosaltAnalysisAPI = qc_microsalt_context.meta_apis["analysis_api"]
store: Store = analysis_api.status_db
mock.patch.object(trailblazer_api, "is_latest_analysis_completed", return_value=True)
analysis_api.trailblazer_api = trailblazer_api

# GIVEN a running case in the store
helpers.ensure_case(store=store, data_analysis=Pipeline.MICROSALT, action=CaseActions.RUNNING)

# WHEN getting the cases to store in Housekeeper
cases_to_store: list[Case] = analysis_api.get_cases_to_store()
case: Case = cases_to_store[0]

# THEN a list with one microsalt case is returned
assert len(cases_to_store) == 1
assert case.data_analysis == Pipeline.MICROSALT
assert case.action == CaseActions.RUNNING


def test_get_cases_to_store_pass(
qc_microsalt_context: CGConfig,
caplog,
Expand Down

0 comments on commit da79782

Please sign in to comment.