aboutsummaryrefslogtreecommitdiff
path: root/test/requests/parametrized_test.py
diff options
context:
space:
mode:
authorzsloan2018-03-29 10:36:12 -0500
committerGitHub2018-03-29 10:36:12 -0500
commitb215b5fe5c6d13f0ed445106230e1e38db71c918 (patch)
tree97f1f47b092bef38856ac34c1bd745e471c38311 /test/requests/parametrized_test.py
parente67e3a76fca0bad4796853eb58140a412922bc9c (diff)
parente0c706c51c834caa836ecffd27a5d18fc23178ff (diff)
downloadgenenetwork2-b215b5fe5c6d13f0ed445106230e1e38db71c918.tar.gz
Merge pull request #297 from pjotrp/testing
Testing
Diffstat (limited to 'test/requests/parametrized_test.py')
-rw-r--r--test/requests/parametrized_test.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/requests/parametrized_test.py b/test/requests/parametrized_test.py
new file mode 100644
index 00000000..abf98fce
--- /dev/null
+++ b/test/requests/parametrized_test.py
@@ -0,0 +1,27 @@
+import logging
+import unittest
+from elasticsearch import Elasticsearch, TransportError
+
+class ParametrizedTest(unittest.TestCase):
+
+ def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"):
+ super(ParametrizedTest, self).__init__(methodName=methodName)
+ self.gn2_url = gn2_url
+ self.es_url = es_url
+
+ def setUp(self):
+ self.es = Elasticsearch([self.es_url])
+ self.es_cleanup = []
+
+ es_logger = logging.getLogger("elasticsearch")
+ es_logger.addHandler(
+ logging.FileHandler("/tmp/es_TestRegistrationInfo.log"))
+ es_trace_logger = logging.getLogger("elasticsearch.trace")
+ es_trace_logger.addHandler(
+ logging.FileHandler("/tmp/es_TestRegistrationTrace.log"))
+
+ def tearDown(self):
+ self.es.delete_by_query(
+ index="users"
+ , doc_type="local"
+ , body={"query":{"match":{"email_address":"test@user.com"}}})