def test_config(tmpdir_factory, session):
    session.add(admin(True))
    session.add(standard_user(True))
    session.commit()

    root_directory = tmpdir_factory.mktemp('data')
    app.config['DATA_DIRECTORY'] = str(root_directory)
def test_config(tmpdir_factory, session):
    session.add(standard_user(True))
    session.commit()

    root_directory = tmpdir_factory.mktemp('data')
    subdir = root_directory.mkdir(standard_user().username)

    subdir.mkdir('empty_dir')
    subdir.mkdir('subdirectory')
    subdir.join('subdir_text.txt').write(
        "this is a text file inside data/subdir")
    subdir.join('test.txt').write("content")
    subdir.join('file.json').write('{"test": "json"}')
    subdir.join('directory.yml').write("-yaml file")
    app.config['DATA_DIRECTORY'] = str(root_directory)
def test_config(tmpdir_factory, session, pipeline):
    session.add(standard_user(encrypted=True))
    session.commit()

    pipelines_root = tmpdir_factory.mktemp('pipelines')
    pipelines_root.join(pipeline.get_converted_filename()).write(
        pipeline.get_converted_json())
    boutiques_dir = pipelines_root.mkdir(pipeline.descriptor_type)
    boutiques_dir.join(pipeline.get_original_filename()).write(
        pipeline.get_original_json())
    app.config['PIPELINE_DIRECTORY'] = str(pipelines_root)

    data_root = tmpdir_factory.mktemp('data')
    user_dir = data_root.mkdir(standard_user().username)
    user_dir.join('test.txt').write('test file')
    user_execution_dir = user_dir.mkdir('executions')
    app.config['DATA_DIRECTORY'] = str(data_root)
Exemplo n.º 4
0
def user_creator(session):
    session.add(standard_user(encrypted=True))
    session.commit()
Exemplo n.º 5
0
def test_config(session):
    session.add(standard_user(True))
    session.commit()