Commit 170c2de7 authored by David Mendez's avatar David Mendez
Browse files

Add functional test for getting group config

parent 6aff67b7
......@@ -5,8 +5,8 @@
"""
import argparse
from specific_tests import fun_test_simple_query, fun_test_query_with_context, fun_test_property_config
from specific_tests import fun_test_simple_query, fun_test_query_with_context, fun_test_property_config, \
fun_test_group_config
PARSER = argparse.ArgumentParser()
PARSER.add_argument('server_base_path', help='server base path to run the tests against',
......@@ -22,8 +22,10 @@ def run():
"""
print(f'Running functional tests on {ARGS.server_base_path}')
for test_module in [fun_test_simple_query, fun_test_query_with_context, fun_test_property_config]:
for test_module in [fun_test_simple_query, fun_test_query_with_context, fun_test_property_config,
fun_test_group_config]:
test_module.run_test(ARGS.server_base_path, ARGS.delayed_jobs_server_base_path)
if __name__ == "__main__":
run()
# pylint: disable=import-error,unused-argument
"""
Module that tests a group config
"""
import requests
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the configuration of a group
: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 configuration of a group')
print('-------------------------------------------')
url = f'{server_base_url}/properties_configuration/group/chembl_molecule/browser_table'
print('url: ', url)
config_request = requests.get(url)
status_code = config_request.status_code
print(f'status_code: {status_code}')
response_text = config_request.text
utils.print_es_response(response_text)
assert status_code == 200, 'The request failed!'
......@@ -5,6 +5,7 @@ Module that tests a property_config
import requests
from specific_tests import utils
def run_test(server_base_url, delayed_jobs_server_base_path):
"""
Tests getting the configuration of a property
......
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