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
96f42d7b
Commit
96f42d7b
authored
Jul 09, 2020
by
David Mendez
Browse files
Add functional tests for target and assay classifications
parent
53d233c7
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
2 deletions
+86
-2
functional_tests/run_functional_tests.py
functional_tests/run_functional_tests.py
+6
-2
functional_tests/specific_tests/fun_test_go_slim_target_classification.py
.../specific_tests/fun_test_go_slim_target_classification.py
+20
-0
functional_tests/specific_tests/fun_test_in_vivo_assay_classification.py
...s/specific_tests/fun_test_in_vivo_assay_classification.py
+20
-0
functional_tests/specific_tests/fun_test_organism_taxonomy_target_classification.py
...tests/fun_test_organism_taxonomy_target_classification.py
+20
-0
functional_tests/specific_tests/fun_test_protein_target_classification.py
.../specific_tests/fun_test_protein_target_classification.py
+20
-0
No files found.
functional_tests/run_functional_tests.py
View file @
96f42d7b
...
...
@@ -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
)
...
...
functional_tests/specific_tests/fun_test_go_slim_target_classification.py
0 → 100644
View file @
96f42d7b
# 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
)
functional_tests/specific_tests/fun_test_in_vivo_assay_classification.py
0 → 100644
View file @
96f42d7b
# 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
)
functional_tests/specific_tests/fun_test_organism_taxonomy_target_classification.py
0 → 100644
View file @
96f42d7b
# 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
)
functional_tests/specific_tests/fun_test_protein_target_classification.py
0 → 100644
View file @
96f42d7b
# 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
)
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