def test_find_acquisition_project(): project = MockParent('project') expected_value = [ { '_id': 'acquisition_id', 'type': 'acquisition' } ] actual_value = run.find_error_containers('acquisition', project) assert expected_value == actual_value
def test_find_session_project(): project = MockParent('project') expected_value = [ { '_id': 'session_id', 'type': 'session' } ] assert expected_value == run.find_error_containers('session', project)
def test_find_acquisition_session(): session = MockParent('session') expected_value = [ { '_id': 'acquisition_id', 'type': 'acquisition' } ] assert expected_value == run.find_error_containers('acquisition', session)
def test_find_acquisition_subject(): subject = MockParent('subject') expected_value = [ { '_id': 'acquisition_id', 'type': 'acquisition' } ] assert expected_value == run.find_error_containers('acquisition', subject)
def test_find_all_for_project(): project = MockParent('project') expected_value = [ { '_id': 'subject_id', 'type': 'subject' }, { '_id': 'session_id', 'type': 'session' }, { '_id': 'acquisition_id', 'type': 'acquisition' } ] assert expected_value == run.find_error_containers('all', project)
def test_find_subject_subject(): subject = MockParent('subject') with pytest.raises(ValueError): run.find_error_containers('subject', subject)
def test_find_session_session(): session = MockParent('session') with pytest.raises(ValueError): run.find_error_containers('session', session)