Skip to content

Commit

Permalink
Update test_client_c1200.py
Browse files Browse the repository at this point in the history
  • Loading branch information
swwgames authored Nov 20, 2024
1 parent 08f6636 commit d031c41
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/test_client_c1200.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,16 @@ def test_vpn_status(self) -> None:
"remoteip": "10.0.0.11-20"
}
"""
respone_vpnconn_openvpn = """[{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"openvpn","key":"7450"},
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"openvpn","key":"7450"}]
"""

respone_vpnconn_pptpvpn = """[{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"pptp","key":"7450"},
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"pptp","key":"7450"},
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"pptp","key":"7450"}]
"""
respone_vpnconn_openvpn = """[
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"openvpn","key":"7450"},
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"openvpn","key":"7450"}
]"""

respone_vpnconn_pptpvpn = """[
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"pptp","key":"7450"},
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"pptp","key":"7450"},
{"username":"admin","remote_ip":"192.168.0.200","ipaddr":"10.0.0.11","extra":"7450","vpntype":"pptp","key":"7450"}
]"""

class TPLinkRouterTest(TplinkC1200Router):
def request(self, path: str, data: str,
Expand Down Expand Up @@ -202,6 +203,7 @@ def test_set_vpn(self) -> None:
"port": "1194",
"serverip": "10.8.0.0"
}"""

class TPLinkRouterTest(TplinkC1200Router):
def request(self, path: str, data: str,
ignore_response: bool = False, ignore_errors: bool = False) -> dict | None:
Expand All @@ -218,5 +220,6 @@ def request(self, path: str, data: str,

self.assertEqual(client.captured_path, expected_path)


if __name__ == '__main__':
main()

0 comments on commit d031c41

Please sign in to comment.