Exemplo n.º 1
0
def test_avalon_plugin_presets(monkeypatch, printer):

    pype.install()
    api.register_host(Test())
    api.register_plugin(api.Creator, MyTestCreator)
    plugins = api.discover(api.Creator)
    printer("Test if we got our test plugin")
    assert MyTestCreator in plugins
    for p in plugins:
        if p.__name__ == "MyTestCreator":
            printer("Test if we have overriden existing property")
            assert p.my_test_property == "B"
            printer("Test if we have overriden superclass property")
            assert p.active is False
            printer("Test if we have added new property")
            assert p.new_property == "new"
Exemplo n.º 2
0
def register_default_actions():
    """Register default actions for Launcher"""
    api.register_plugin(api.Action, ProjectManagerAction)
    api.register_plugin(api.Action, LoaderAction)