aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/requests/test-website.py24
-rw-r--r--test/requests/test_registration.py35
2 files changed, 0 insertions, 59 deletions
diff --git a/test/requests/test-website.py b/test/requests/test-website.py
index 85174408..8b35c8ec 100755
--- a/test/requests/test-website.py
+++ b/test/requests/test-website.py
@@ -35,33 +35,12 @@ def print_help(args_obj, parser):
def dummy(args_obj, parser):
print("Not implemented yet.")
-def integration_tests(args_obj, parser):
- gn2_url = args_obj.host
- run_integration_tests(gn2_url, es_url)
def initTest(klass, gn2_url, es_url):
loader = TestLoader()
methodNames = loader.getTestCaseNames(klass)
return [klass(mname, gn2_url, es_url) for mname in methodNames]
-def integration_suite(gn2_url, es_url):
- test_cases = [
- TestRegistration
- , TestLoginLocal
- , TestLoginGithub
- , TestLoginOrcid
- , TestForgotPassword
- ]
- the_suite = TestSuite()
- for case in test_cases:
- the_suite.addTests(initTest(case, gn2_url, es_url))
- return the_suite
-
-def run_integration_tests(gn2_url, es_url):
- runner = TextTestRunner()
- runner.run(integration_suite(gn2_url, es_url))
-
-
desc = """
This is Mechanical-Rob - an automated web server tester for
Genenetwork.org
@@ -95,9 +74,6 @@ parser.add_argument("-m", "--mapping", dest="accumulate"
, action="store_const", const=check_mapping, default=print_help
, help="Checks for mapping.")
-parser.add_argument("-i", "--integration-tests", dest="accumulate"
- , action="store_const", const=integration_tests, default=print_help
- , help="Runs integration tests.")
args = parser.parse_args()
diff --git a/test/requests/test_registration.py b/test/requests/test_registration.py
deleted file mode 100644
index 5d08bf58..00000000
--- a/test/requests/test_registration.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import sys
-import requests
-
-class TestRegistration(ParametrizedTest):
-
-
- def testRegistrationPage(self):
- 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
- suite = unittest.TestSuite()
- suite.addTest(TestRegistration(methodName="testRegistrationPage", gn2_url=gn2, es_url=es))
- runner = unittest.TextTestRunner()
- runner.run(suite)
-
-if __name__ == "__main__":
- if len(sys.argv) < 3:
- raise Exception("Required arguments missing")
- else:
- main(sys.argv[1], sys.argv[2])