tplinkrouterc6u 5.2.0__tar.gz → 5.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/PKG-INFO +1 -1
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/setup.py +1 -1
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/test_client_xdr.py +48 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/xdr.py +1 -1
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u.egg-info/PKG-INFO +1 -1
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/LICENSE +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/README.md +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/setup.cfg +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/__init__.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/test_client_c1200.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/test_client_c6u.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/test_client_deco.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/test_client_ex.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/test/test_client_mr.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/__init__.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/__init__.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/c1200.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/c5400x.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/c6u.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/c6v4.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/deco.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/ex.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client/mr.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/client_abstract.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/common/__init__.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/common/dataclass.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/common/encryption.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/common/exception.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/common/helper.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/common/package_enum.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u/provider.py +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u.egg-info/SOURCES.txt +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u.egg-info/dependency_links.txt +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u.egg-info/requires.txt +0 -0
- {tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u.egg-info/top_level.txt +0 -0
|
@@ -13,6 +13,54 @@ from tplinkrouterc6u.common.package_enum import Connection
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class TestTPLinkXDRClient(TestCase):
|
|
16
|
+
|
|
17
|
+
def test_supports_false(self) -> None:
|
|
18
|
+
class SessionTest:
|
|
19
|
+
def get(self, host, timeout, verify):
|
|
20
|
+
class ResponseTest:
|
|
21
|
+
def __init__(self):
|
|
22
|
+
self.text = 'text'
|
|
23
|
+
|
|
24
|
+
return ResponseTest()
|
|
25
|
+
|
|
26
|
+
client = TPLinkXDRClient('', '')
|
|
27
|
+
client._session = SessionTest()
|
|
28
|
+
|
|
29
|
+
self.assertEqual(client.supports(), False)
|
|
30
|
+
|
|
31
|
+
def test_supports_true(self) -> None:
|
|
32
|
+
response = '''<!DOCTYPE html>
|
|
33
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
34
|
+
<head>
|
|
35
|
+
<title>TL-XDR3010易展版</title>
|
|
36
|
+
<meta name="MobileOptimized" content="240" />
|
|
37
|
+
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=0.5,
|
|
38
|
+
maximum-scale=2.0, user-scalable=yes" />
|
|
39
|
+
<link rel="shortcut Icon" href="../web-static/images/icon.ico" type="image/x-icon" />
|
|
40
|
+
<link rel="stylesheet" href="../web-static/dynaform/class.css">
|
|
41
|
+
<script type="text/javascript" src="../web-static/dynaform/class.js"></script>
|
|
42
|
+
<script type="text/javascript" src="../web-static/dynaform/jtopo.js"></script>
|
|
43
|
+
</head>
|
|
44
|
+
<body><div id="Error"></div><div id="Confirm"></div><div id="Con"></div><div id="Help"></div><div id="Cover"></div>
|
|
45
|
+
<div id="Login"></div><script type="text/javascript">var gBeInCNA = "NO";var proName="TL-XDR3010易展版";pageOnload();
|
|
46
|
+
</script>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
49
|
+
'''
|
|
50
|
+
|
|
51
|
+
class SessionTest:
|
|
52
|
+
def get(self, host, timeout, verify):
|
|
53
|
+
class ResponseTest:
|
|
54
|
+
def __init__(self):
|
|
55
|
+
self.text = response
|
|
56
|
+
|
|
57
|
+
return ResponseTest()
|
|
58
|
+
|
|
59
|
+
client = TPLinkXDRClient('', '')
|
|
60
|
+
client._session = SessionTest()
|
|
61
|
+
|
|
62
|
+
self.assertEqual(client.supports(), True)
|
|
63
|
+
|
|
16
64
|
def test_logout(self) -> None:
|
|
17
65
|
mock_data = json.loads('''{"error_code":0}''')
|
|
18
66
|
check_payload = {}
|
|
@@ -25,7 +25,7 @@ class TPLinkXDRClient(AbstractRouter):
|
|
|
25
25
|
|
|
26
26
|
def supports(self) -> bool:
|
|
27
27
|
response = self._session.get(self.host, timeout=self.timeout, verify=self._verify_ssl)
|
|
28
|
-
return
|
|
28
|
+
return 'TL-XDR' in response.text
|
|
29
29
|
|
|
30
30
|
def authorize(self) -> None:
|
|
31
31
|
response = self._session.post(self.host, json={
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tplinkrouterc6u-5.2.0 → tplinkrouterc6u-5.2.1}/tplinkrouterc6u.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|