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
babd9bd2
Commit
babd9bd2
authored
Jun 01, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests
parent
cbeca1c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
sshserver.py
tests/sshserver.py
+1
-1
test_app.py
tests/test_app.py
+5
-7
No files found.
tests/sshserver.py
View file @
babd9bd2
...
...
@@ -124,7 +124,7 @@ def run_ssh_server(port=2200, running=True):
continue
# wait for auth
chan
=
t
.
accept
(
2
0
)
chan
=
t
.
accept
(
2
)
if
chan
is
None
:
print
(
'*** No channel.'
)
continue
...
...
tests/test_app.py
View file @
babd9bd2
...
...
@@ -17,7 +17,7 @@ handler.DELAY = 0.1
class
TestApp
(
AsyncHTTPTestCase
):
_is_running
=
False
running
=
[
True
]
sshserver_port
=
2200
body
=
u'hostname=127.0.0.1&port={}&username=robey&password=foo'
.
format
(
sshserver_port
)
# noqa
...
...
@@ -32,19 +32,17 @@ class TestApp(AsyncHTTPTestCase):
@classmethod
def
setUpClass
(
cls
):
print
(
'='
*
20
)
t
=
threading
.
Thread
(
target
=
run_ssh_server
,
args
=
(
cls
.
sshserver_port
,
cls
)
target
=
run_ssh_server
,
args
=
(
cls
.
sshserver_port
,
cls
.
running
)
)
t
.
setDaemon
(
True
)
t
.
start
()
@classmethod
def
tearDownClass
(
cls
):
cls
.
_is_running
=
True
@classmethod
def
__bool__
(
cls
):
return
cls
.
_is_running
cls
.
running
.
pop
()
print
(
'='
*
20
)
def
test_app_with_invalid_form
(
self
):
response
=
self
.
fetch
(
'/'
)
...
...
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