diff options
author | zsloan | 2018-04-16 22:23:19 +0000 |
---|---|---|
committer | zsloan | 2018-04-16 22:23:19 +0000 |
commit | 35913e15bb6ac93c429e9465ebc36215cc6350ea (patch) | |
tree | d0eaff3a15bb167d995f1459ee7e744697f137b3 /test/requests/parametrized_test.py | |
parent | 273b79a0c2096a2eae5ce9aa2800917437459f68 (diff) | |
parent | f511e38a9b440d08313471cdcc7bfd99add98f70 (diff) | |
download | genenetwork2-35913e15bb6ac93c429e9465ebc36215cc6350ea.tar.gz |
Resolved conflicts after pulling changes
Diffstat (limited to 'test/requests/parametrized_test.py')
-rw-r--r-- | test/requests/parametrized_test.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/requests/parametrized_test.py b/test/requests/parametrized_test.py index abf98fce..50003850 100644 --- a/test/requests/parametrized_test.py +++ b/test/requests/parametrized_test.py @@ -1,5 +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): @@ -10,10 +12,11 @@ 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") + es_logger.setLevel(app.config.get("LOG_LEVEL")) es_logger.addHandler( logging.FileHandler("/tmp/es_TestRegistrationInfo.log")) es_trace_logger = logging.getLogger("elasticsearch.trace") @@ -21,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) |