-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
test.py
35 lines (26 loc) · 839 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
class BaseTestCase(unittest.TestCase):
def setUp(self):
pass
def test_enable_ssl(self):
from app import app as _app
config = {'reqdata': {'email': "[email protected]"}}
config['subdomains'] = "sample1.com, sample2.com"
from app import mk_cmd
reg_cmd, crt_cmd = mk_cmd(config)
assert(len(reg_cmd) > 0)
assert(len(crt_cmd) > 0)
# print(reg_cmd)
# print(crt_cmd)
config['subdomains'] = {"prod": "sample1.com", "dev": "sample2.com"}
reg_cmd, crt_cmd = mk_cmd(config)
assert(len(reg_cmd) > 0)
assert(len(crt_cmd) > 0)
# print(reg_cmd)
# print(crt_cmd)
def tearDown(self):
pass
if __name__ == "__main__":
unittest.main()