Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑天保
webssh
Commits
ffb776ca
Commit
ffb776ca
authored
Apr 26, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use absolute path for importing modules
parent
f78588bc
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
17 deletions
+19
-17
__init__.py
tests/__init__.py
+0
-4
sshserver.py
tests/sshserver.py
+1
-1
test_app.py
tests/test_app.py
+3
-3
test_handler.py
tests/test_handler.py
+1
-1
test_policy.py
tests/test_policy.py
+4
-2
test_settings.py
tests/test_settings.py
+4
-2
handler.py
webssh/handler.py
+1
-1
main.py
webssh/main.py
+2
-2
settings.py
webssh/settings.py
+3
-1
No files found.
tests/__init__.py
View file @
ffb776ca
import
sys
sys
.
path
.
insert
(
0
,
'webssh'
)
tests/sshserver.py
View file @
ffb776ca
...
...
@@ -29,7 +29,7 @@ from paramiko.py3compat import u, decodebytes
# setup logging
paramiko
.
util
.
log_to_file
(
'sshserver.log'
)
paramiko
.
util
.
log_to_file
(
'
tests/
sshserver.log'
)
host_key
=
paramiko
.
RSAKey
(
filename
=
'tests/test_rsa.key'
)
# host_key = paramiko.DSSKey(filename='test_dss.key')
...
...
tests/test_app.py
View file @
ffb776ca
import
json
import
handler
import
webssh.handler
as
handler
import
random
import
threading
import
tornado.websocket
...
...
@@ -7,8 +7,8 @@ import tornado.gen
from
tornado.testing
import
AsyncHTTPTestCase
from
tornado.options
import
options
from
main
import
make_app
,
make_handlers
from
settings
import
get_app_settings
from
webssh.
main
import
make_app
,
make_handlers
from
webssh.
settings
import
get_app_settings
from
tests.sshserver
import
run_ssh_server
...
...
tests/test_handler.py
View file @
ffb776ca
...
...
@@ -3,7 +3,7 @@ import os.path
import
paramiko
from
tornado.httputil
import
HTTPServerRequest
from
handler
import
MixinHandler
,
IndexHandler
from
webssh.
handler
import
MixinHandler
,
IndexHandler
class
TestMixinHandler
(
unittest
.
TestCase
):
...
...
tests/test_policy.py
View file @
ffb776ca
...
...
@@ -4,8 +4,10 @@ import paramiko
from
shutil
import
copyfile
from
paramiko.client
import
RejectPolicy
,
WarningPolicy
from
policy
import
(
AutoAddPolicy
,
get_policy_dictionary
,
load_host_keys
,
get_policy_class
,
check_policy_setting
)
from
webssh.policy
import
(
AutoAddPolicy
,
get_policy_dictionary
,
load_host_keys
,
get_policy_class
,
check_policy_setting
)
class
TestPolicy
(
unittest
.
TestCase
):
...
...
tests/test_settings.py
View file @
ffb776ca
...
...
@@ -3,8 +3,10 @@ import unittest
import
paramiko
import
tornado.options
as
options
from
settings
import
get_host_keys_settings
,
get_policy_setting
,
base_dir
from
policy
import
load_host_keys
from
webssh.settings
import
(
get_host_keys_settings
,
get_policy_setting
,
base_dir
)
from
webssh.policy
import
load_host_keys
class
TestSettings
(
unittest
.
TestCase
):
...
...
webssh/handler.py
View file @
ffb776ca
...
...
@@ -8,7 +8,7 @@ import paramiko
import
tornado.web
from
tornado.ioloop
import
IOLoop
from
worker
import
Worker
,
recycle_worker
,
workers
from
w
ebssh.w
orker
import
Worker
,
recycle_worker
,
workers
try
:
from
concurrent.futures
import
Future
...
...
webssh/main.py
View file @
ffb776ca
...
...
@@ -3,8 +3,8 @@ import tornado.web
import
tornado.ioloop
from
tornado.options
import
parse_command_line
,
options
from
handler
import
IndexHandler
,
WsockHandler
from
settings
import
(
get_app_settings
,
get_host_keys_settings
,
from
webssh.
handler
import
IndexHandler
,
WsockHandler
from
webssh.
settings
import
(
get_app_settings
,
get_host_keys_settings
,
get_policy_setting
)
...
...
webssh/settings.py
View file @
ffb776ca
...
...
@@ -3,7 +3,9 @@ import os.path
import
uuid
from
tornado.options
import
define
from
policy
import
load_host_keys
,
get_policy_class
,
check_policy_setting
from
webssh.policy
import
(
load_host_keys
,
get_policy_class
,
check_policy_setting
)
define
(
'address'
,
default
=
'127.0.0.1'
,
help
=
'listen address'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment