Commit 96f42d7b authored by David Mendez's avatar David Mendez
Browse files

Add functional tests for target and assay classifications

parent 53d233c7
......@@ -7,7 +7,9 @@ import argparse
from specific_tests import fun_test_simple_query, fun_test_query_with_context, fun_test_property_config, \
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_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
PARSER = argparse.ArgumentParser()
PARSER.add_argument('server_base_path', help='server base path to run the tests against',
......@@ -26,7 +28,9 @@ def run():
for test_module in [fun_test_simple_query, fun_test_query_with_context, fun_test_property_config,
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_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]:
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 go slim target classification
"""
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 go slim target classification')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/target_classifications/go_slim'
utils.assert_get_request_succeeds(url)
# pylint: disable=import-error,unused-argument
"""
Module that tests a the in vivo assay classification
"""
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the in vivo assay 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 in vivo assay classification')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/assay_classifications/in_vivo'
utils.assert_get_request_succeeds(url)
# pylint: disable=import-error,unused-argument
"""
Module that tests a the organism taxonomy classification
"""
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the organism taxonomy 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 organism taxonomy classification')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/target_classifications/organism_taxonomy'
utils.assert_get_request_succeeds(url)
# pylint: disable=import-error,unused-argument
"""
Module that tests a the protein target classification
"""
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 protein target classification')
print('-------------------------------------------')
url = f'{server_base_url}/visualisations/target_classifications/protein_classification'
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