Commit c1d7c9cd by Sheng

Added test_get_policy_dictionary

parent 452a6281
......@@ -22,7 +22,8 @@ A simple web application to be used as an ssh client to connect to your ssh serv
git clone https://github.com/huashengdun/webssh.git
cd webssh
pip install -r requirements.txt
python webssh/main.py
cd webssh
python main.py
```
### Options
......
import unittest
from paramiko.client import RejectPolicy, WarningPolicy
from webssh.policy import AutoAddPolicy, get_policy_dictionary
class TestPolicy(unittest.TestCase):
def test_get_policy_dictionary(self):
classes = [AutoAddPolicy, RejectPolicy, WarningPolicy]
dic = get_policy_dictionary()
for cls in classes:
val = dic[cls.__name__.lower()]
self.assertIs(cls, val)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment