webssh

Web based ssh client https://github.com/huashengdun/webssh webssh.huashengdun.org/
git clone http://git.hanabi.in/repos/webssh.git
Log | Files | Refs | README | LICENSE

commit c1d7c9cd7fa60ecfa5a2578e134ee01de9948abc
parent 452a62814eb38ccebd0832dbb3049ca7e398d20b
Author: Sheng <webmaster0115@gmail.com>
Date:   Sun, 22 Apr 2018 20:59:22 +0800

Added test_get_policy_dictionary

Diffstat:
MREADME.md | 3++-
Atests/test_policy.py | 13+++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -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 diff --git a/tests/test_policy.py b/tests/test_policy.py @@ -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)