예제 #1
0
def remove_library(command):
    """
    tests if the remove library command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'rl' or namespace.command == "removelibrary"
    assert namespace.name == "test"
예제 #2
0
def run(command):

    namespace = app.main(command)
    assert namespace.command == 'r' or namespace.command == "run"
    assert namespace.notebook == "test"
    if "html" in command:
        assert namespace.html == "html"
예제 #3
0
def import_ruleset(command):
    """
    tests if the import ruleset command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'ir' or namespace.command == "importruleset"
    assert namespace.path == "test"
예제 #4
0
def view_ruleset(command):
    """
    tests if the view ruleset command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'vr' or namespace.command == "viewruleset"
    assert namespace.name == "test"
예제 #5
0
def view_library_param(command):
    """
    tests if the view library param command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'vl' or namespace.command == "viewlibparam"
    assert namespace.name == "test"
예제 #6
0
def search_param(command):
    """
    tests if the set param command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'sv' or namespace.command == "searchparam"
    assert namespace.term == "test"
예제 #7
0
def delete_param(command):
    """
    tests if the delete param command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'dp' or namespace.command == "deleteparam"
    assert namespace.name == "test"
예제 #8
0
def resume_scene(command):
    """
    tests if the resume scene command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'rs' or namespace.command == "resumescene"
    assert namespace.name == "test"
예제 #9
0
def deactivate_ruleset(command):
    """
    tests if the deactivate ruleset command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'dr' or namespace.command == "deactivateruleset"
    assert namespace.name == "test"
예제 #10
0
def change_scene(command):
    """
    tests if the change scene command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'cs' or namespace.command == "changescene"
    assert namespace.name == "test"
예제 #11
0
def new_scene(command):
    """
    tests if the new scene command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'ns' or namespace.command == "newscene"
    assert namespace.name == "test"
예제 #12
0
def remove_ruleset(command):
    """
    tests if the remove ruleset command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'rr' or namespace.command == "removeruleset"
    assert namespace.name == "test"
예제 #13
0
def sync_library(command):
    """
    tests if the sync library command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'sl' or namespace.command == "synclibrary"
    if "path" in command:
        assert namespace.path == "test"
예제 #14
0
def delete_scene(command):
    """
    tests if the delete scene command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'ds' or namespace.command == "deletescene"
    if "test" in command:
        assert namespace.name == "test"
예제 #15
0
def end_scene(command):
    """
    tests if the end scene command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'es' or namespace.command == "endscene"
    if "test" in command:
        assert namespace.name == "test"
예제 #16
0
def set_param(command):
    """
    tests if the set param command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'sp' or namespace.command == "setparam"
    assert namespace.name == "test"
    assert namespace.value == "test"
예제 #17
0
def edit_ruleset(command):
    """
    tests if the edit ruleset command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'er' or namespace.command == "editruleset"
    assert namespace.name == "test"
    assert namespace.action in ['a', 'd']
예제 #18
0
def import_model(command):
    """
    tests if the import model command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'im' or namespace.command == "importmodel"
    assert namespace.modelpath == "test1"
    assert namespace.convertpath == "test2"
예제 #19
0
def add_library(command):
    """
    tests if the add library command is running properly 
    """
    from src.praxxis.library import list_library

    namespace = app.main(command)
    assert namespace.command == 'al' or namespace.command == "addlibrary"
    assert namespace.path == "test"
예제 #20
0
def test_0_args(library_db):
    """
    this tests the 0 args command.
    this should have no command, since the 0 args case gets handled manually
    """
    import argparse

    namespace = app.main([])
    assert namespace.__class__ == argparse.Namespace
예제 #21
0
def update_model(command):
    """
    tests if the update model command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'um' or namespace.command == "updatemodel"
예제 #22
0
def next_notebook(command):
    """
    tests if the notebook command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'n' or namespace.command == "whatnext"
예제 #23
0
def history(command):
    """
    tests if the history command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'h' or namespace.command == "history"
예제 #24
0
def list_param(command):
    """
    tests if the list param command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'lp' or namespace.command == "listparam"
예제 #25
0
def list_scene(command):
    """
    tests if the list scene command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'ls' or namespace.command == "listscenes"
예제 #26
0
def list_notebooks(command):
    """
    tests if the list command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'l' or namespace.command == "list"
예제 #27
0
def list_rulesets(command):
    """
    tests if the list rulesets command is running properly
    """
    namespace = app.main(command)
    assert namespace.command == 'lr' or namespace.command == "listrulesets"
예제 #28
0
def pull_notebook_param(command):
    namespace = app.main(command)
    assert namespace.command == 'p' or namespace.command == "pullparam"
    assert namespace.notebook == "test"
예제 #29
0
def update_settings(command):
    """
    tests if the update setting command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'u' or namespace.command == "updatesettings"
예제 #30
0
def list_library(command):
    """
    tests if the list library command is running properly 
    """
    namespace = app.main(command)
    assert namespace.command == 'll' or namespace.command == "listlibrary"