示例#1
0
def data_manager(root, tmpdir):
    _conf = {'ip': '127.0.0.1', 'mock.port': 9090}
    application._cm = MockConfigManager(config=_conf)
    _dm = dm.DataManager()
    _dm.snapshot_workspace = tmpdir
    _dm.set_adapter(data_adapter)
    _dm.set_root(root)
    return _dm
示例#2
0
def data_manager(root):
    _conf = {'ip': '127.0.0.1', 'mock.port': 9090}
    application._cm = MockConfigManager(config=_conf)
    _dm = dm.DataManager()
    _dm.set_adapter(data_adapter)
    _dm.set_root(root)
    context.application.data_manager = _dm
    return _dm
示例#3
0
def test_load_from_path(root):
    _dm = dm.DataManager()
    _dm.set_root(root)

    assert 'dataA-UUID' in _dm.id_map
    assert 'dataB-UUID' in _dm.id_map
    assert 'dataC-UUID' in _dm.id_map
    assert 'groupA-UUID' in _dm.id_map
    assert 'groupB-UUID' in _dm.id_map
    assert 'groupC-UUID' in _dm.id_map
示例#4
0
def data_manager(root):
    _dm = dm.DataManager()
    _dm.set_root(root)
    return _dm