about summary refs log tree commit diff
path: root/test/requests/test_registration.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/requests/test_registration.py')
-rw-r--r--test/requests/test_registration.py36
1 files changed, 15 insertions, 21 deletions
diff --git a/test/requests/test_registration.py b/test/requests/test_registration.py
index 0047e8a6..5d08bf58 100644
--- a/test/requests/test_registration.py
+++ b/test/requests/test_registration.py
@@ -1,31 +1,25 @@
 import sys
 import requests
-from parametrized_test import ParametrizedTest
 
 class TestRegistration(ParametrizedTest):
 
-    def tearDown(self):
-        for item in self.es_cleanup:
-            self.es.delete(index="users", doc_type="local", id=item["_id"])
 
     def testRegistrationPage(self):
-        if self.es.ping():
-            data = {
-                "email_address": "test@user.com",
-                "full_name": "Test User",
-                "organization": "Test Organisation",
-                "password": "test_password",
-                "password_confirm": "test_password"
-            }
-            requests.post(self.gn2_url+"/n/register", data)
-            response = self.es.search(
-                index="users"
-                , doc_type="local"
-                , body={
-                    "query": {"match": {"email_address": "test@user.com"}}})
-            self.assertEqual(len(response["hits"]["hits"]), 1)
-        else:
-            self.skipTest("The elasticsearch server is down")
+        data = {
+            "email_address": "test@user.com",
+            "full_name": "Test User",
+            "organization": "Test Organisation",
+            "password": "test_password",
+            "password_confirm": "test_password"
+        }
+        requests.post(self.gn2_url+"/n/register", data)
+        response = self.es.search(
+            index="users"
+            , doc_type="local"
+            , body={
+                "query": {"match": {"email_address": "test@user.com"}}})
+        self.assertEqual(len(response["hits"]["hits"]), 1)
+
 
 def main(gn2, es):
     import unittest