Esempio n. 1
0
def file_manager_mock(s3_client_mock, js_tree_builder):
    return FileManager(s3_client_mock, js_tree_builder)
Esempio n. 2
0
def test_create_from_config():
    file_manager = FileManager.create_from_environ()
Esempio n. 3
0
def file_manager(s3_client, js_tree_builder):
    return FileManager(s3_client, js_tree_builder)
Esempio n. 4
0
 def configure(binder):
     binder.bind(
         FileManager,
         to=FileManager.create_from_environ(),
         scope=flask_injector.request
     )
Esempio n. 5
0
def node_delete(file_manager: FileManager):
    data = request.get_json()
    file_manager.delete_node(data['path'])
    return Response()
Esempio n. 6
0
def node_rename(file_manager: FileManager):
    data = request.get_json()
    file_manager.rename_node(data['old_path'], data['new_path'])
    return Response()
Esempio n. 7
0
def tree(file_manager: FileManager):
    tree = file_manager.get_tree()
    return jsonify(tree)