Commit 1b0452b9 authored by Victor Dosda's avatar Victor Dosda
Browse files

fix chunking_test.py bad URL on get data

parent 5cc56033
...@@ -29,6 +29,7 @@ from tests.unit.persistence.dask_blob_storage_test import generate_df ...@@ -29,6 +29,7 @@ from tests.unit.persistence.dask_blob_storage_test import generate_df
Definitions = { Definitions = {
'WellLog': { 'WellLog': {
'api_version': 'v3',
'base_url': '/ddms/v3/welllogs', 'base_url': '/ddms/v3/welllogs',
'chunking_url': '/alpha/ddms/v3/welllogs', # TODO: update when no longer alpha 'chunking_url': '/alpha/ddms/v3/welllogs', # TODO: update when no longer alpha
'kind': 'osdu:wks:work-product-component--WellLog:1.0.0', 'kind': 'osdu:wks:work-product-component--WellLog:1.0.0',
...@@ -39,6 +40,7 @@ Definitions = { ...@@ -39,6 +40,7 @@ Definitions = {
}, },
'WellboreTrajectory': { 'WellboreTrajectory': {
'api_version': 'v3',
'base_url': '/ddms/v3/wellboretrajectories', 'base_url': '/ddms/v3/wellboretrajectories',
'chunking_url': '/alpha/ddms/v3/wellboretrajectories', # TODO: update when no longer alpha 'chunking_url': '/alpha/ddms/v3/wellboretrajectories', # TODO: update when no longer alpha
'kind': 'osdu:wks:work-product-component--WellboreTrajectory:1.0.0', 'kind': 'osdu:wks:work-product-component--WellboreTrajectory:1.0.0',
...@@ -50,6 +52,7 @@ Definitions = { ...@@ -50,6 +52,7 @@ Definitions = {
} }
}, },
'Log': { 'Log': {
'api_version': 'v2',
'base_url': '/ddms/v2/logs', 'base_url': '/ddms/v2/logs',
'chunking_url': '/alpha/ddms/v2/logs', # TODO: update when no longer alpha 'chunking_url': '/alpha/ddms/v2/logs', # TODO: update when no longer alpha
'kind': 'osdu:wks:log:1.0.5', 'kind': 'osdu:wks:log:1.0.5',
...@@ -201,9 +204,9 @@ def test_send_all_data_once(setup_client, ...@@ -201,9 +204,9 @@ def test_send_all_data_once(setup_client,
initial_data_df = generate_df(columns, range(5, 13)) initial_data_df = generate_df(columns, range(5, 13))
data_to_send = create_func(initial_data_df) data_to_send = create_func(initial_data_df)
headers = {'content-type': content_type_header} headers = {'content-type': content_type_header}
# test no data
with pytest.raises(BulkNotFound): get_response_no_data = client.get(f'{chunking_url}/{record_id}/data', headers=headers)
client.get(f'{Definitions[entity_type]["chunking_url"]}/{record_id}/data', headers=headers) assert get_response_no_data.status_code == 404
write_response = client.post(f'{chunking_url}/{record_id}/data', data=data_to_send, headers=headers) write_response = client.post(f'{chunking_url}/{record_id}/data', data=data_to_send, headers=headers)
assert write_response.status_code == 200 assert write_response.status_code == 200
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment