Commit f83b4182 authored by David Mendez's avatar David Mendez
Browse files

Add functional tests for new database summary endpoints

parent 6d0f5c21
......@@ -9,7 +9,8 @@ from specific_tests import fun_test_simple_query, fun_test_query_with_context, f
fun_test_group_config, fun_test_facets_group_config, fun_test_get_document, fun_test_id_properties, \
fun_test_get_context_data, fun_test_search_parsing, fun_test_url_shortening, fun_test_element_usage, \
fun_test_go_slim_target_classification, fun_test_in_vivo_assay_classification, \
fun_test_organism_taxonomy_target_classification, fun_test_protein_target_classification
fun_test_organism_taxonomy_target_classification, fun_test_protein_target_classification, \
fun_test_covid_entities_records, fun_test_database_summary, fun_test_entities_records
PARSER = argparse.ArgumentParser()
PARSER.add_argument('server_base_path', help='server base path to run the tests against',
......@@ -30,7 +31,8 @@ def run():
fun_test_id_properties, fun_test_get_context_data, fun_test_search_parsing,
fun_test_url_shortening, fun_test_element_usage, fun_test_go_slim_target_classification,
fun_test_in_vivo_assay_classification, fun_test_organism_taxonomy_target_classification,
fun_test_protein_target_classification]:
fun_test_protein_target_classification, fun_test_covid_entities_records,
fun_test_database_summary, fun_test_entities_records]:
test_module.run_test(ARGS.server_base_path, ARGS.delayed_jobs_server_base_path)
......
# pylint: disable=import-error,unused-argument
"""
Module that tests a the covid entities records
"""
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the protein target classification
:param server_base_url: base url of the running server. E.g. http://127.0.0.1:5000
:param delayed_jobs_server_base_path: base path for the delayed_jobs
"""
print('-------------------------------------------')
print('Testing getting the covid entities_records')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/covid_entities_records'
utils.assert_get_request_succeeds(url)
# pylint: disable=import-error,unused-argument
"""
Module that tests a the database summary
"""
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the go slim target classification
:param server_base_url: base url of the running server. E.g. http://127.0.0.1:5000
:param delayed_jobs_server_base_path: base path for the delayed_jobs
"""
print('-------------------------------------------')
print('Testing getting the database summary')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/database_summary'
utils.assert_get_request_succeeds(url)
# pylint: disable=import-error,unused-argument
"""
Module that tests a the entities records
"""
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the protein target classification
:param server_base_url: base url of the running server. E.g. http://127.0.0.1:5000
:param delayed_jobs_server_base_path: base path for the delayed_jobs
"""
print('-------------------------------------------')
print('Testing getting the entities_records')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/entities_records'
utils.assert_get_request_succeeds(url)
Markdown is supported
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