Esempio n. 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
Esempio n. 2
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')