diff options
author | Arthur Centeno | 2021-10-29 17:39:27 +0000 |
---|---|---|
committer | Arthur Centeno | 2021-10-29 17:39:27 +0000 |
commit | 2b0c5c94d344b839ef1d6899b5bb239f14942610 (patch) | |
tree | e08ac49c5e1190fa2be28c1238a552646c3fde13 /test/requests/test_registration.py | |
parent | 24480fad2d67a6e35b03997e23c6d849a60623a0 (diff) | |
parent | 44bf8ee8463fe7182282ec10e259d4c9eb7526b8 (diff) | |
download | genenetwork2-2b0c5c94d344b839ef1d6899b5bb239f14942610.tar.gz |
Merge github.com:genenetwork/genenetwork2 into acenteno
Diffstat (limited to 'test/requests/test_registration.py')
-rw-r--r-- | test/requests/test_registration.py | 36 |
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 |