Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Apr 15, 2024
1 parent 9dd8c21 commit cc83ade
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git+https://github.com/oda-hub/nb2workflow.git@master#egg=nb2workflow[service,rdf]
git+https://github.com/oda-hub/oda_api.git@master#egg=oda_api
git+https://github.com/oda-hub/dispatcher-app.git@master#egg=cdci_data_analysis
git+https://github.com/oda-hub/dispatcher-app.git@return-progress-dedicated-output-file#egg=cdci_data_analysis
12 changes: 6 additions & 6 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,11 @@ def test_return_progress(dispatcher_live_fixture, mock_backend, run_asynch):
logger.info(json.dumps(jdata, indent=4, sort_keys=True))
logger.info(jdata)
assert c.status_code == 200
assert 'progress_product_list' in jdata['products']
assert 'progress_product_list' in jdata['return_progress_products']
with open(os.path.join(os.path.dirname(__file__), 'responses', 'test_output.html'), 'r') as fd:
test_output_html = fd.read()

assert jdata['products']['progress_product_list'][0]['value'] == test_output_html
assert jdata['return_progress_products']['progress_product_list'][0]['value'] == test_output_html


def test_return_progress_no_glued_output(set_env_var_plugin_config_no_glued_output_file_path, dispatcher_live_fixture, mock_backend):
Expand All @@ -564,11 +564,11 @@ def test_return_progress_no_glued_output(set_env_var_plugin_config_no_glued_outp
logger.info(json.dumps(jdata, indent=4, sort_keys=True))
logger.info(jdata)
assert c.status_code == 200
assert 'progress_product_list' in jdata['products']
assert 'progress_product_list' in jdata['return_progress_products']
with open(os.path.join(os.path.dirname(__file__), 'responses', 'test_output_no_glue_output.html'), 'r') as fd:
test_output_html = fd.read()

assert jdata['products']['progress_product_list'][0]['value'] == test_output_html
assert jdata['return_progress_products']['progress_product_list'][0]['value'] == test_output_html


@pytest.mark.parametrize("api", [True, False])
Expand Down Expand Up @@ -597,10 +597,10 @@ def test_api_return_progress(dispatcher_live_fixture, mock_backend, api):
with open(os.path.join(os.path.dirname(__file__), 'responses', 'test_output.html'), 'r') as fd:
test_output_html = fd.read()
if api:
assert 'progress_product_list' in jdata['products']
assert 'progress_product_list' in jdata['return_progress_products']
assert jdata['products']['progress_product_list'][0]['value'] == test_output_html
else:
assert 'progress_product_html_output' in jdata['products']
assert 'progress_product_html_output' in jdata['return_progress_products']
assert jdata['products']['progress_product_html_output'][0] == test_output_html


Expand Down

0 comments on commit cc83ade

Please sign in to comment.