Skip to content

Commit d3cc80a

Browse files
committed
Adjust usage examples and documentation for .exec(). Closes #77
v12.9.1 should have been a major version to indicate the change in behavior
1 parent 7b0ce0e commit d3cc80a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tcms_api/__init__.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@
8484
8585
from tcms_api import TCMS
8686
87-
rpc_client = TCMS()
87+
rpc = TCMS().exec
8888
89-
for test_case in rpc_client.exec.TestCase.filter({'pk': 46490}):
89+
for test_case in rpc.TestCase.filter({'pk': 46490}):
9090
print(test_case)
9191
9292
9393
After tcms-api v13.2 you can pass connection configuration directly as
9494
arguments when initializing the TCMS() class::
9595
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
9797
9898
9999
.. important::
@@ -216,5 +216,14 @@ def exec(self):
216216
"""
217217
Property that returns the underlying XML-RPC connection on which
218218
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!
219228
"""
220229
return _ConnectionProxy(self.config)

0 commit comments

Comments
 (0)