diff --git a/manageSSL/tests.py b/manageSSL/tests.py index 7bb9e0ebb..b0702086c 100755 --- a/manageSSL/tests.py +++ b/manageSSL/tests.py @@ -27,16 +27,6 @@ class TestManageSSL(TestCase): result = requests.get(path) return str(result.text) - def setupConnection(self): - try: - import MySQLdb as mysql - import MySQLdb.cursors as cursors - conn = mysql.connect(user='admin_hello', passwd='helloworld', cursorclass=cursors.SSCursor) - cursor = conn.cursor() - return conn, cursor - except: - return 0, 0 - def setUp(self): ## Verify login @@ -76,6 +66,26 @@ class TestManageSSL(TestCase): self.assertEqual(exists, 1) + def test_obtainHostNameSSL(self): + ## Issue SSL + + data_ret = {'virtualHost': 'cyberpanel.xyz'} + + try: + self.MakeRequest('manageSSL/obtainHostNameSSL', data_ret) + except: + pass + + import time + time.sleep(2) + + ## Verify SSL + + path = '/usr/local/lscp/conf/key.pem' + + import os + self.assertEqual(os.path.islink(path), True) +