Example #1
0
def test_output_path_security():
    """
    Attempt to download a file outside of a valid result directory,
    ensure it fails.
    """
    with test_manager() as manager:
        raised_exception = False
        try:
            _output_path(manager, '1', '../moo', 'direct')
        except:
            raised_exception = True
        assert raised_exception
Example #2
0
def test_output_path_security():
    """
    Attempt to download a file outside of a valid result directory,
    ensure it fails.
    """
    with test_manager() as manager:
        raised_exception = False
        try:
            _output_path(manager, '1', '../moo', 'direct')
        except Exception:
            raised_exception = True
        assert raised_exception
Example #3
0
def test_output_path():
    with test_manager() as manager:
        path = _output_path(manager, '1', 'moo', 'direct')
        assert path == join(manager.job_directory('1').outputs_directory(), 'moo')
Example #4
0
def test_output_path():
    with test_manager() as manager:
        path = _output_path(manager, '1', 'moo', 'direct')
        assert path == join(manager.job_directory('1').outputs_directory(), 'moo')
Example #5
0
def test_output_path():
    with test_manager() as manager:
        path = _output_path(manager, "1", "moo", "direct")
        assert path == join(manager.job_directory("1").outputs_directory(), "moo")