diff --git a/tests/conftest.py b/tests/conftest.py index 5c50a0a..cc65bf0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -119,6 +119,8 @@ def mock_backend(httpserver): bin_json = json.loads(fd.read()) with open(os.path.join(responses_path, 'image.json'), 'r') as fd: image_json = json.loads(fd.read()) + with open(os.path.join(responses_path, 'data_product.json'), 'r') as fd: + data_product_json = json.loads(fd.read()) # with open(os.path.join(responses_path, 'test_output.html'), 'r') as fd: # test_output_html = fd.read() @@ -128,6 +130,8 @@ def mock_backend(httpserver): httpserver.expect_request(f'/api/v1.0/get/table').respond_with_json(table_json) httpserver.expect_request(f'/api/v1.0/get/ascii_binary').respond_with_json(bin_json) httpserver.expect_request(f'/api/v1.0/get/image').respond_with_json(image_json) + httpserver.expect_request(f'/api/v1.0/get/data_product').respond_with_json(data_product_json) + httpserver.expect_request(f'/api/v1.0/get/data_product_no_annotations').respond_with_json(data_product_json) # httpserver.expect_request(f'/trace/nb2w-ylp5ovnm/lightcurve').respond_with_data(test_output_html) httpserver.expect_request(f'/trace/nb2w-ylp5ovnm/lightcurve').respond_with_handler(trace_get_func_handler) httpserver.expect_request(f'/api/v1.0/get/dummy_echo').respond_with_handler(return_request_query_dict) diff --git a/tests/responses/data_product.json b/tests/responses/data_product.json new file mode 100644 index 0000000..078f778 --- /dev/null +++ b/tests/responses/data_product.json @@ -0,0 +1,7 @@ +{ + "exceptions": [], + "jobdir": "/tmp/nb2w-aqkvl461", + "output": { + "result": {} + } +} \ No newline at end of file diff --git a/tests/responses/options.json b/tests/responses/options.json index e1df66d..f4fe633 100644 --- a/tests/responses/options.json +++ b/tests/responses/options.json @@ -38,6 +38,34 @@ }, "parameters": {} }, + "data_product": { + "output": { + "result": { + "comment": " http://odahub.io/ontology#DataProduct", + "name": "result", + "owl_type": "http://odahub.io/ontology#DataProduct", + "python_type": { + "type_object": "" + }, + "value": "" + } + }, + "parameters": {} + }, + "data_product_no_annotations": { + "output": { + "result": { + "comment": "", + "name": "result", + "owl_type": "", + "python_type": { + "type_object": "" + }, + "value": "" + } + }, + "parameters": {} + }, "image": { "output": { "result": {