File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 84
84
85
85
from tcms_api import TCMS
86
86
87
- rpc_client = TCMS()
87
+ rpc = TCMS().exec
88
88
89
- for test_case in rpc_client.exec .TestCase.filter({'pk': 46490}):
89
+ for test_case in rpc .TestCase.filter({'pk': 46490}):
90
90
print(test_case)
91
91
92
92
93
93
After tcms-api v13.2 you can pass connection configuration directly as
94
94
arguments when initializing the TCMS() class::
95
95
96
- TCMS("https://kiwitcms.example.com/xml-rpc/", "api-bot", "keep-me-secret")
96
+ TCMS("https://kiwitcms.example.com/xml-rpc/", "api-bot", "keep-me-secret").exec
97
97
98
98
99
99
.. important::
@@ -216,5 +216,14 @@ def exec(self):
216
216
"""
217
217
Property that returns the underlying XML-RPC connection on which
218
218
you can call various server-side functions.
219
+
220
+ .. important::
221
+
222
+ Call this property once and assign it to a temporary variable as
223
+ shown in the examples above. Then use the ``rpc`` variable to
224
+ access the different RPC methods!
225
+
226
+ Starting with tcms-api v12.9.1 this property is automatically refreshed
227
+ every 4 minutes to avoid SSL connection timeout errors!
219
228
"""
220
229
return _ConnectionProxy (self .config )
You can’t perform that action at this time.
0 commit comments