mirror of
https://github.com/huashengdun/webssh.git
synced 2026-02-14 11:49:50 +00:00
Updated test_app.py
This commit is contained in:
@@ -122,13 +122,13 @@ class TestAppBasic(AsyncHTTPTestCase):
|
||||
self.assert_response(b'Invalid port', response)
|
||||
|
||||
def test_app_with_wrong_hostname_ip(self):
|
||||
body = 'hostname=127.0.0.1&port=7000&username=admin&_xsrf=yummy'
|
||||
body = 'hostname=127.0.0.2&port=2200&username=admin&_xsrf=yummy'
|
||||
response = self.sync_post(body)
|
||||
self.assertEqual(response.code, 200)
|
||||
self.assertIn(b'Unable to connect to', response.body)
|
||||
|
||||
def test_app_with_wrong_hostname_domain(self):
|
||||
body = 'hostname=xxxxxxxxxxxx&port=7000&username=admin&_xsrf=yummy'
|
||||
body = 'hostname=xxxxxxxxxxxx&port=2200&username=admin&_xsrf=yummy'
|
||||
response = self.sync_post(body)
|
||||
self.assertEqual(response.code, 200)
|
||||
self.assertIn(b'Unable to connect to', response.body)
|
||||
|
||||
Reference in New Issue
Block a user