Skip to content

Commit

Permalink
more test data
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Jan 13, 2025
1 parent f39c8db commit 959d222
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions tests/responses/data_product.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"exceptions": [],
"jobdir": "/tmp/nb2w-aqkvl461",
"output": {
"result": {}
}
}
28 changes: 28 additions & 0 deletions tests/responses/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<class 'str'>"
},
"value": ""
}
},
"parameters": {}
},
"data_product_no_annotations": {
"output": {
"result": {
"comment": "",
"name": "result",
"owl_type": "",
"python_type": {
"type_object": "<class 'str'>"
},
"value": ""
}
},
"parameters": {}
},
"image": {
"output": {
"result": {
Expand Down

0 comments on commit 959d222

Please sign in to comment.