Пример #1
0
def _test_register_task(task_json=None, filename=None):
    tr = TaskRegistry(gbdx)

    if task_json:
        rv = tr.register(task_json)
    else:
        rv = tr.register(filename)

    assert 'successfully registered' in rv.lower()
def _test_register_task(task_json=None, filename=None):
    tr = TaskRegistry(gbdx)

    if task_json:
        rv = tr.register(task_json)
    else:
        rv = tr.register(filename)

    assert 'successfully registered' in rv.lower()
Пример #3
0
def test_register_fails_when_both_json_and_file():
    tr = TaskRegistry(gbdx)

    try:
        tr.register(task_json={'any': 'thing'}, json_filename="any")
    except Exception as e:
        if "Both task json and filename can't be provided." in str(e):
            pass
        else:
            raise
Пример #4
0
def test_register_fails_when_both_json_and_file_none():
    tr = TaskRegistry(gbdx)

    try:
        tr.register(task_json=None, json_filename=None)
    except Exception as e:
        if "Both task json and filename can't be none." in str(e):
            pass
        else:
            raise
def test_register_fails_when_both_json_and_file_none():
    tr = TaskRegistry(gbdx)

    try:
        tr.register(task_json=None, json_filename=None)
    except Exception as e:
        if "Both task json and filename can't be none." in str(e):
            pass
        else:
            raise
def test_register_fails_when_both_json_and_file():
    tr = TaskRegistry(gbdx)

    try:
        tr.register(task_json={'any': 'thing'}, json_filename="any")
    except Exception as e:
        if "Both task json and filename can't be provided." in str(e):
            pass
        else:
            raise