From 44bf8ee8463fe7182282ec10e259d4c9eb7526b8 Mon Sep 17 00:00:00 2001
From: BonfaceKilz
Date: Thu, 28 Oct 2021 11:14:42 +0300
Subject: Remove tests that refer to deleted "ParametrizedTest"
"ParametrizedTest" references ElasticSearch.
---
test/requests/test_login_github.py | 47 --------------------------------------
1 file changed, 47 deletions(-)
delete mode 100644 test/requests/test_login_github.py
(limited to 'test/requests/test_login_github.py')
diff --git a/test/requests/test_login_github.py b/test/requests/test_login_github.py
deleted file mode 100644
index 1bf4f695..00000000
--- a/test/requests/test_login_github.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import uuid
-import requests
-from time import sleep
-from wqflask import app
-from parameterized import parameterized
-from parametrized_test import ParametrizedTest
-
-login_link_text = 'Sign in'
-logout_link_text = 'Sign out'
-uid = str(uuid.uuid4())
-
-class TestLoginGithub(ParametrizedTest):
-
- def setUp(self):
- super(TestLoginGithub, self).setUp()
- data = {
- "user_id": uid
- , "name": "A. T. Est User"
- , "github_id": 693024
- , "user_url": "https://fake-github.com/atestuser"
- , "login_type": "github"
- , "organization": ""
- , "active": 1
- , "confirmed": 1
- }
- self.es.create(index="users", doc_type="local", body=data, id=uid)
- sleep(1)
-
- def tearDown(self):
- super(TestLoginGithub, self).tearDown()
- self.es.delete(index="users", doc_type="local", id=uid)
-
- def testLoginUrl(self):
- login_button_text = 'Login with Github'
- result = requests.get(self.gn2_url+"/n/login")
- index = result.content.find(login_button_text)
- self.assertTrue(index >= 0, "Should have found `Login with Github` button")
-
- @parameterized.expand([
- ("1234", login_link_text, "Login should have failed with non-existing user")
- , (uid, logout_link_text, "Login should have been successful with existing user")
- ])
- def testLogin(self, test_uid, expected, message):
- url = self.gn2_url+"/n/login?type=github&uid="+test_uid
- result = requests.get(url)
- index = result.content.find(expected)
- self.assertTrue(index >= 0, message)
--
cgit v1.2.3