Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ChEMBL
C
ChEMBL
Main Web Interface
Elasticsearch Proxy API
Commits
f83b4182
Commit
f83b4182
authored
Jul 10, 2020
by
David Mendez
Browse files
Add functional tests for new database summary endpoints
parent
6d0f5c21
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
2 deletions
+64
-2
functional_tests/run_functional_tests.py
functional_tests/run_functional_tests.py
+4
-2
functional_tests/specific_tests/fun_test_covid_entities_records.py
...l_tests/specific_tests/fun_test_covid_entities_records.py
+20
-0
functional_tests/specific_tests/fun_test_database_summary.py
functional_tests/specific_tests/fun_test_database_summary.py
+20
-0
functional_tests/specific_tests/fun_test_entities_records.py
functional_tests/specific_tests/fun_test_entities_records.py
+20
-0
No files found.
functional_tests/run_functional_tests.py
View file @
f83b4182
...
...
@@ -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
)
...
...
functional_tests/specific_tests/fun_test_covid_entities_records.py
0 → 100644
View file @
f83b4182
# 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
)
functional_tests/specific_tests/fun_test_database_summary.py
0 → 100644
View file @
f83b4182
# 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
)
functional_tests/specific_tests/fun_test_entities_records.py
0 → 100644
View file @
f83b4182
# 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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment