forked from ZennoLab/capmonstercloud-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxy_fields_test.py
More file actions
30 lines (22 loc) · 978 Bytes
/
Copy pathproxy_fields_test.py
File metadata and controls
30 lines (22 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import unittest
from capmonstercloudclient.requests.proxy_info import ProxyInfo
FIELDS = ['proxyType', 'proxyAddress', 'proxyPort', 'proxyLogin', 'proxyPassword']
class ProxyFieldsTest(unittest.TestCase):
proxyPort: int = 8000
proxyType: str = 'https'
proxyAddress: str = 'proxyAddress'
proxyLogin: str = 'proxyLogin'
proxyPassword: str = 'proxyPassword'
def testFields(self):
p = ProxyInfo(proxyType=ProxyFieldsTest.proxyType,
proxyAddress=ProxyFieldsTest.proxyAddress,
proxyPort=ProxyFieldsTest.proxyPort,
proxyLogin=ProxyFieldsTest.proxyLogin,
proxyPassword=ProxyFieldsTest.proxyPassword)
d = p.model_dump()
for field in FIELDS:
self.assertTrue(
field in d,
msg=f'Expected that "{field}" will be in {list(d.keys())}')
if __name__ == '__main__':
unittest.main()