Exemple #1
0
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
Exemple #2
0
def test_find_session_project():
    project = MockParent('project')
    expected_value = [
        {
            '_id': 'session_id',
            'type': 'session'
        }
    ]

    assert expected_value == run.find_error_containers('session', project)
Exemple #3
0
def test_find_acquisition_session():
    session = MockParent('session')
    expected_value = [
        {
            '_id': 'acquisition_id',
            'type': 'acquisition'
        }
    ]

    assert expected_value == run.find_error_containers('acquisition', session)
Exemple #4
0
def test_find_acquisition_subject():
    subject = MockParent('subject')
    expected_value = [
        {
            '_id': 'acquisition_id',
            'type': 'acquisition'
        }
    ]

    assert expected_value == run.find_error_containers('acquisition', subject)
Exemple #5
0
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)
Exemple #6
0
def test_find_subject_subject():
    subject = MockParent('subject')
    with pytest.raises(ValueError):
        run.find_error_containers('subject', subject)
Exemple #7
0
def test_find_session_session():
    session = MockParent('session')
    with pytest.raises(ValueError):
        run.find_error_containers('session', session)