Skip to content

Commit

Permalink
Patch test
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard committed May 6, 2024
1 parent 65290c4 commit 3ad4619
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/services/test_analysis_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ def test_patch_analyses_delivered(

def test_update_analysis_status(analysis_store: Store, analysis_service: AnalysisService):
# GIVEN a store with ongoing analyses
assert analysis_store.get_ongoing_analyses()
# GIVEN that all slurm jobs are completed
ongoing_analyses: list[Analysis] = analysis_store.get_ongoing_analyses()
assert ongoing_analyses

# GIVEN that some analyses are completed

# WHEN updating the status of the analyses
analysis_service.update_ongoing_analyses()

# THEN the status of all analyses should be updated
assert not analysis_store.get_ongoing_analyses()
# THEN the status of some analyses should be updated
currently_ongoing_analyses: list[Analysis] = analysis_store.get_ongoing_analyses()
assert len(currently_ongoing_analyses) < len(ongoing_analyses)

0 comments on commit 3ad4619

Please sign in to comment.