Beispiel #1
0
def test_plugin_manager_load_crud_solvent(m_get_plugin_class):
    plugin_manager = PluginManager()
    plugin_manager.load_plugin("pymdmix_solvent")
    assert "solvent" in plugin_manager.plugins
    args = MDMIX_PARSER.parse_args(["solvent", "list"])
    plugin: SolventPlugin = plugin_manager.plugins["solvent"]
    plugin.run(args)
    assert len(plugin.session.query(plugin.CLASS).all()) == 0
def test_plugin_manager_load_crud_plugin_template(m_get_plugin_class):
    plugin_manager = PluginManager()
    plugin_manager.load_plugin("pymdmix_plugin_template")
    assert "crud_plugin_template" in plugin_manager.plugins
    args = MDMIX_PARSER.parse_args(["crud_plugin_template", "list"])
    plugin: CrudPluginTemplate = plugin_manager.plugins["crud_plugin_template"]
    plugin.run(args)
    assert len(plugin.session.query(plugin.CLASS).all()) == 0
Beispiel #3
0
def test_plugin_manager_load_solvent():
    plugin_manager = PluginManager()
    plugin_manager.load_plugin("pymdmix_solvent")
    assert "solvent" in plugin_manager.plugins
Beispiel #4
0
def get_plugin_manager() -> PluginManager:
    plugin_manager = PluginManager(get_mdmix_parser())
    plugin_manager.load_plugin("pymdmix_solvent")
    return plugin_manager
Beispiel #5
0
def get_plugin_manager():
    plugin_manager = PluginManager(get_mdmix_parser())
    plugin_manager.load_plugin(PLUGIN_PACKAGE)
    return plugin_manager
Beispiel #6
0
def test_load_multiple_plugins():
    parser = get_mdmix_parser()
    plugin_manager = PluginManager(parser)
    plugin_manager.load_plugin("pymdmix_core")
    plugin_manager.load_plugin("tests.fixture_plugin")
    assert len(plugin_manager.plugins) == 2
Beispiel #7
0
def test_plugin_manager_load_plugin():
    plugin_manager = PluginManager()
    plugin_manager.load_plugin("tests.fixture_plugin")

    assert "fixtureplugin" in plugin_manager.plugins
def test_plugin_manager_load_plugin_template():

    plugin_manager = PluginManager()
    plugin_manager.load_plugin("pymdmix_plugin_template")

    assert "plugin_template" in plugin_manager.plugins
Beispiel #9
0
def test_plugin_manager_load_plugin():
    plugin_manager = PluginManager()
    plugin_manager.load_plugin("pymdmix_project")

    assert "project" in plugin_manager.plugins