aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/requests/parametrized_test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/requests/parametrized_test.py b/test/requests/parametrized_test.py
index c585e910..50003850 100644
--- a/test/requests/parametrized_test.py
+++ b/test/requests/parametrized_test.py
@@ -1,6 +1,7 @@
import logging
import unittest
from wqflask import app
+from utility.elasticsearch_tools import get_elasticsearch_connection, get_user_by_unique_column
from elasticsearch import Elasticsearch, TransportError
class ParametrizedTest(unittest.TestCase):
@@ -11,7 +12,7 @@ class ParametrizedTest(unittest.TestCase):
self.es_url = es_url
def setUp(self):
- self.es = Elasticsearch([self.es_url])
+ self.es = get_elasticsearch_connection()
self.es_cleanup = []
es_logger = logging.getLogger("elasticsearch")
@@ -23,7 +24,9 @@ class ParametrizedTest(unittest.TestCase):
logging.FileHandler("/tmp/es_TestRegistrationTrace.log"))
def tearDown(self):
+ from time import sleep
self.es.delete_by_query(
index="users"
, doc_type="local"
, body={"query":{"match":{"email_address":"test@user.com"}}})
+ sleep(1)