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
7228b812
Commit
7228b812
authored
Jul 07, 2020
by
David Mendez
Browse files
Fun test - URL shortening: make it sleep to make sure url is saved in ES
parent
161d141a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
functional_tests/specific_tests/fun_test_url_shortening.py
functional_tests/specific_tests/fun_test_url_shortening.py
+4
-2
No files found.
functional_tests/specific_tests/fun_test_url_shortening.py
View file @
7228b812
# pylint: disable=import-error
, unused-import
# pylint: disable=import-error
"""
Module that tests a url shortening
"""
import
json
import
time
import
requests
...
...
@@ -50,6 +50,8 @@ def run_test(server_base_url, delayed_jobs_server_base_path):
utils
.
print_es_response
(
response_text
)
assert
status_code
==
200
,
'The request failed!'
time
.
sleep
(
5
)
# make it sleep to make sure the url is saved in ES
response_json
=
request
.
json
()
long_url_got
=
response_json
.
get
(
'long_url'
)
assert
long_url
==
long_url_got
,
'The long url was not obtained!'
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