aboutsummaryrefslogtreecommitdiff
path: root/test/requests/test_registration.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-10-28 11:05:19 +0300
committerBonfaceKilz2021-10-28 11:10:21 +0300
commit03caa57ad209f3bdd135be9d6516b94261c9b8de (patch)
tree17ddfbdd37fe7fa7b3007dbaf2805813f136be2b /test/requests/test_registration.py
parent230184bf1484ed672bf66c29110bcb47e556f72f (diff)
downloadgenenetwork2-03caa57ad209f3bdd135be9d6516b94261c9b8de.tar.gz
Remove all elasticsearch references in gn2
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