Beispiel #1
0
def test_missing_mandatory_urls_are_reported(context):
    context.task = task_generator.generate_object()
    del(context.task['scopes'])

    with pytest.raises(ScriptWorkerTaskException):
        validate_task_schema(context)
Beispiel #2
0
def test_no_error_is_reported_when_no_missing_url(context):
    context.task = task_generator.generate_object()
    validate_task_schema(context)
def test_missing_mandatory_urls_are_reported(context):
    context.task = task_generator.generate_object(urls=[])  # no URLs provided

    with pytest.raises(ScriptWorkerTaskException):
        validate_task_schema(context)