mirror of https://github.com/huashengdun/webssh
Added test_get_policy_dictionary
parent
452a62814e
commit
c1d7c9cd7f
|
@ -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
|
git clone https://github.com/huashengdun/webssh.git
|
||||||
cd webssh
|
cd webssh
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
python webssh/main.py
|
cd webssh
|
||||||
|
python main.py
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
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)
|
Loading…
Reference in New Issue