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
656e2ff0
Commit
656e2ff0
authored
Oct 10, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tested default port
parent
0c9db2ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
test_app.py
tests/test_app.py
+22
-0
No files found.
tests/test_app.py
View file @
656e2ff0
...
...
@@ -153,6 +153,28 @@ class TestAppBasic(AsyncHTTPTestCase):
self
.
assertIsNotNone
(
data
[
'id'
])
self
.
assertIsNotNone
(
data
[
'encoding'
])
def
test_app_with_correct_credentials_but_with_no_port
(
self
):
default_port
=
handler
.
DEFAULT_PORT
handler
.
DEFAULT_PORT
=
self
.
sshserver_port
# with no port value
body
=
self
.
body
.
replace
(
str
(
self
.
sshserver_port
),
''
)
response
=
self
.
sync_post
(
body
)
data
=
json
.
loads
(
to_str
(
response
.
body
))
self
.
assertIsNone
(
data
[
'status'
])
self
.
assertIsNotNone
(
data
[
'id'
])
self
.
assertIsNotNone
(
data
[
'encoding'
])
# with no port argument
body
=
body
.
replace
(
'port=&'
,
''
)
response
=
self
.
sync_post
(
body
)
data
=
json
.
loads
(
to_str
(
response
.
body
))
self
.
assertIsNone
(
data
[
'status'
])
self
.
assertIsNotNone
(
data
[
'id'
])
self
.
assertIsNotNone
(
data
[
'encoding'
])
handler
.
DEFAULT_PORT
=
default_port
@tornado.testing.gen_test
def
test_app_with_correct_credentials_timeout
(
self
):
url
=
self
.
get_url
(
'/'
)
...
...
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