def test_remove(test_chanjodb, case_id): # GIVEN a database with a sample (group) loaded assert coverage.is_loaded(case_id) is True # WHEN removing the group of samples coverage.remove(test_chanjodb, group_id=case_id) # THEN the samples are not loaded anymore assert coverage.is_loaded(case_id) is False
def test_parse_payload(analysis_payload, config, case_id): """Process payload for coverage.""" # GIVEN an empty chanjo database assert coverage.is_loaded(case_id) is False # WHEN processing an `ANALYSIS_DONE` payload coverage.parse_payload(db=None, payload=analysis_payload, config=config) # THEN the sample is loaded assert coverage.is_loaded(case_id) is True
def test_existing_is_loaded(test_chanjodb, case_id): # GIVEN a populated database # WHEN checking if the loaded group of samples are loaded was_loaded = coverage.is_loaded(group_id=case_id) # THEN is should indicate that the samples are already loaded assert was_loaded is True
def test_is_loaded(chanjo_db, case_id): # GIVEN an empty database # WHEN checking if any group of samples are loaded was_loaded = coverage.is_loaded(group_id=case_id) # THEN it should indicate they aren't loaded assert was_loaded is False