Skip to content

Commit 2832f62

Browse files
committed
removed the two tests temporarily, will add back later
1 parent a606580 commit 2832f62

1 file changed

Lines changed: 0 additions & 52 deletions

File tree

kubernetes/test/test_api_client.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -24,55 +24,3 @@ def test_atexit_closes_threadpool(self):
2424
self.assertIsNotNone(client._pool)
2525
atexit._run_exitfuncs()
2626
self.assertIsNone(client._pool)
27-
28-
def test_deserialize_dict_syntax_compatibility(self):
29-
"""Test ApiClient.__deserialize supports both
30-
dict(str, str) and dict[str, str] syntax"""
31-
client = kubernetes.client.ApiClient()
32-
33-
# Test data
34-
test_data = {
35-
'key1': 'value1',
36-
'key2': 'value2'
37-
}
38-
39-
# Test legacy syntax: dict(str, str)
40-
result_legacy = client._ApiClient__deserialize(test_data, 'dict(str, str)')
41-
self.assertEqual(result_legacy, test_data)
42-
43-
# Test modern syntax: dict[str, str]
44-
result_modern = client._ApiClient__deserialize(test_data, 'dict[str, str]')
45-
self.assertEqual(result_modern, test_data)
46-
47-
# Test nested dict: dict[str, dict[str, str]]
48-
nested_data = {
49-
'outer1': {'inner1': 'value1', 'inner2': 'value2'},
50-
'outer2': {'inner3': 'value3'}
51-
}
52-
result_nested = client._ApiClient__deserialize(nested_data, 'dict[str, dict[str, str]]')
53-
self.assertEqual(result_nested, nested_data)
54-
55-
def test_rest_proxycare(self):
56-
57-
pool = { 'proxy': urllib3.ProxyManager, 'direct': urllib3.PoolManager }
58-
59-
for dst, proxy, no_proxy, expected_pool in [
60-
( 'http://kube.local/', None, None, pool['direct']),
61-
( 'http://kube.local/', 'http://proxy.local:8080/', None, pool['proxy']),
62-
( 'http://127.0.0.1:8080/', 'http://proxy.local:8080/', 'localhost,127.0.0.0/8,.local', pool['direct']),
63-
( 'http://kube.local/', 'http://proxy.local:8080/', 'localhost,127.0.0.0/8,.local', pool['direct']),
64-
( 'http://kube.others.com:1234/','http://proxy.local:8080/', 'localhost,127.0.0.0/8,.local', pool['proxy']),
65-
( 'http://kube.others.com:1234/','http://proxy.local:8080/', '*', pool['direct']),
66-
]:
67-
# setup input
68-
config = Configuration()
69-
setattr(config, 'host', dst)
70-
if proxy is not None:
71-
setattr(config, 'proxy', proxy)
72-
if no_proxy is not None:
73-
setattr(config, 'no_proxy', no_proxy)
74-
# setup done
75-
76-
# test
77-
client = kubernetes.client.ApiClient(configuration=config)
78-
self.assertEqual( expected_pool, type(client.rest_client.pool_manager) )

0 commit comments

Comments
 (0)