test_obtainHostNameSSL

This commit is contained in:
Usman Nasir
2019-11-26 15:12:01 +05:00
parent 5c574201cb
commit ef12bbb1f2

View File

@@ -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)