aboutsummaryrefslogtreecommitdiff
path: root/test/requests/parametrized_test.py
diff options
context:
space:
mode:
authorPjotr Prins2018-03-19 10:52:28 +0100
committerGitHub2018-03-19 10:52:28 +0100
commitb359cb0712e9ef923d35524f310d841581d48f30 (patch)
tree3c4cafc0bc0b481490674c807f279b4371130d0c /test/requests/parametrized_test.py
parent2602be69f2869de376d1b9ced6131d880e9476c2 (diff)
parent5ccf077f53c6546bb9258c7116b4b1cf8903375f (diff)
downloadgenenetwork2-b359cb0712e9ef923d35524f310d841581d48f30.tar.gz
Merge pull request #5 from fredmanglis/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"}}})