about summary refs log tree commit diff
path: root/test/requests/test_login_local.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-10-28 11:14:42 +0300
committerBonfaceKilz2021-10-28 11:23:27 +0300
commit44bf8ee8463fe7182282ec10e259d4c9eb7526b8 (patch)
tree6bae6b9883fd447570febc73d812390d331dd210 /test/requests/test_login_local.py
parent03caa57ad209f3bdd135be9d6516b94261c9b8de (diff)
downloadgenenetwork2-44bf8ee8463fe7182282ec10e259d4c9eb7526b8.tar.gz
Remove tests that refer to deleted "ParametrizedTest"
"ParametrizedTest" references ElasticSearch.
Diffstat (limited to 'test/requests/test_login_local.py')
-rw-r--r--test/requests/test_login_local.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/test/requests/test_login_local.py b/test/requests/test_login_local.py
deleted file mode 100644
index 6691d135..00000000
--- a/test/requests/test_login_local.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import requests
-from parameterized import parameterized
-from parametrized_test import ParametrizedTest
-
-login_link_text = '<a id="login_in" href="/n/login">Sign in</a>'
-logout_link_text = '<a id="login_out" title="Signed in as ." href="/n/logout">Sign out</a>'
-
-class TestLoginLocal(ParametrizedTest):
-
-    def setUp(self):
-        super(TestLoginLocal, self).setUp()
-        self.login_url = self.gn2_url +"/n/login"
-        data = {
-            "es_connection": self.es,
-            "email_address": "test@user.com",
-            "full_name": "Test User",
-            "organization": "Test Organisation",
-            "password": "test_password",
-            "password_confirm": "test_password"
-        }
-
-    
-    @parameterized.expand([
-        (
-            {
-                "email_address": "non@existent.email",
-                "password": "doesitmatter?"
-            }, login_link_text, "Login should have failed with the wrong user details."),
-        (
-            {
-                "email_address": "test@user.com",
-                "password": "test_password"
-            }, logout_link_text, "Login should have been successful with correct user details and neither import_collections nor remember_me set"),
-        (
-            {
-                "email_address": "test@user.com",
-                "password": "test_password",
-                "import_collections": "y"
-            }, logout_link_text, "Login should have been successful with correct user details and only import_collections set"),
-        (
-            {
-                "email_address": "test@user.com",
-                "password": "test_password",
-                "remember_me": "y"
-            }, logout_link_text, "Login should have been successful with correct user details and only remember_me set"),
-        (
-            {
-                "email_address": "test@user.com",
-                "password": "test_password",
-                "remember_me": "y",
-                "import_collections": "y"
-            }, logout_link_text, "Login should have been successful with correct user details, and both remember_me, and import_collections set")
-    ])
-    def testLogin(self, data, expected, message):
-        result = requests.post(self.login_url, data=data)
-        index = result.content.find(expected)
-        self.assertTrue(index >= 0, message)