Commit 7228b812 authored by David Mendez's avatar David Mendez
Browse files

Fun test - URL shortening: make it sleep to make sure url is saved in ES

parent 161d141a
# 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):
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!'
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