tcms-api 12.2__tar.gz → 12.8__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.
- {tcms-api-12.2/tcms_api.egg-info → tcms-api-12.8}/PKG-INFO +22 -24
- {tcms-api-12.2 → tcms-api-12.8}/README.rst +19 -20
- tcms-api-12.8/setup.cfg +19 -0
- tcms-api-12.8/setup.py +67 -0
- {tcms-api-12.2 → tcms-api-12.8}/tcms_api/__init__.py +44 -22
- tcms-api-12.8/tcms_api/plugin_helpers.py +642 -0
- tcms-api-12.8/tcms_api/version.py +1 -0
- {tcms-api-12.2 → tcms-api-12.8}/tcms_api/xmlrpc.py +45 -47
- {tcms-api-12.2 → tcms-api-12.8/tcms_api.egg-info}/PKG-INFO +22 -24
- {tcms-api-12.2 → tcms-api-12.8}/tcms_api.egg-info/SOURCES.txt +1 -0
- tcms-api-12.2/setup.cfg +0 -4
- tcms-api-12.2/setup.py +0 -57
- tcms-api-12.2/tcms_api/plugin_helpers.py +0 -616
- tcms-api-12.2/tcms_api/version.py +0 -1
- {tcms-api-12.2 → tcms-api-12.8}/LICENSE +0 -0
- {tcms-api-12.2 → tcms-api-12.8}/MANIFEST.in +0 -0
- {tcms-api-12.2 → tcms-api-12.8}/requirements.txt +0 -0
- {tcms-api-12.2 → tcms-api-12.8}/tcms_api.egg-info/dependency_links.txt +0 -0
- {tcms-api-12.2 → tcms-api-12.8}/tcms_api.egg-info/requires.txt +0 -0
- {tcms-api-12.2 → tcms-api-12.8}/tcms_api.egg-info/top_level.txt +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tcms-api
|
|
3
|
-
Version: 12.
|
|
3
|
+
Version: 12.8
|
|
4
4
|
Summary: Python API for Kiwi
|
|
5
5
|
Home-page: https://github.com/kiwitcms/tcms-api
|
|
6
6
|
Maintainer: Kiwi TCMS
|
|
7
7
|
Maintainer-email: info@kiwitcms.org
|
|
8
8
|
License: LGPLv2+
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
10
|
Classifier: Environment :: Console
|
|
12
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -15,6 +14,8 @@ Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or l
|
|
|
15
14
|
Classifier: Operating System :: POSIX
|
|
16
15
|
Classifier: Programming Language :: Python
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
19
|
Classifier: Topic :: Software Development
|
|
19
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
21
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
@@ -55,35 +56,34 @@ Python API for Kiwi TCMS
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
This package allows to connect and access Kiwi TCMS API.
|
|
58
|
-
For more information see
|
|
59
|
-
http://kiwitcms.readthedocs.io/en/latest/api/index.html.
|
|
60
59
|
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
DOCUMENTATION
|
|
62
|
+
-------------
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
https://tcms-api.readthedocs.io/en/latest/modules/tcms_api.html
|
|
66
65
|
|
|
67
|
-
pip install tcms-api
|
|
68
66
|
|
|
69
|
-
|
|
67
|
+
CHANGELOG
|
|
68
|
+
---------
|
|
70
69
|
|
|
71
|
-
|
|
70
|
+
v12.8 (17 Dec 2023)
|
|
71
|
+
~~~~~~~~~~~~~~~~~~~
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this is usually the case when you install and restart! It must be
|
|
76
|
-
a 64bit installation, see
|
|
77
|
-
`MIT Kerberos for Windows 4.1 <https://web.mit.edu/kerberos/dist/index.html#kfw-4.1>`_
|
|
73
|
+
- When creating a TestPlan limit name to 255 characters
|
|
74
|
+
- When creating a TestCase limit summary to 255 characters
|
|
78
75
|
|
|
79
|
-
**WARNING:** on Linux you will need gcc, Python and kerberos devel packages to
|
|
80
|
-
build ``gssapi`` because it doesn't provide binary packages. Try
|
|
81
|
-
``dnf install gcc krb5-devel python3-devel`` (Red Hat/Fedora) or
|
|
82
|
-
``apt-get install gcc libkrb5-dev libpython3-dev`` (Debian/Ubuntu).
|
|
83
76
|
|
|
77
|
+
v12.7 (10 Dec 2023)
|
|
78
|
+
~~~~~~~~~~~~~~~~~~~
|
|
79
|
+
|
|
80
|
+
- Build & test this package with Python 3.11
|
|
81
|
+
- Replace ``urllib.parse`` functions deprecated since Python 3.8
|
|
82
|
+
- Refactor issues reported by newer version of pylint
|
|
83
|
+
- Refactor issues reported by CodeQL
|
|
84
|
+
- Reformat source code with Black
|
|
85
|
+
- Enable ReadTheDocs CI
|
|
84
86
|
|
|
85
|
-
CHANGELOG
|
|
86
|
-
---------
|
|
87
87
|
|
|
88
88
|
v12.2 (04 Apr 2023)
|
|
89
89
|
~~~~~~~~~~~~~~~~~~~
|
|
@@ -283,11 +283,9 @@ COPYRIGHT
|
|
|
283
283
|
---------
|
|
284
284
|
|
|
285
285
|
- Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
|
286
|
-
- Copyright (c) 2017-
|
|
286
|
+
- Copyright (c) 2017-2023 Kiwi TCMS Project and its contributors. All rights reserved.
|
|
287
287
|
|
|
288
288
|
This library is free software; you can redistribute it and/or
|
|
289
289
|
modify it under the terms of the GNU Lesser General Public
|
|
290
290
|
License as published by the Free Software Foundation; either
|
|
291
291
|
version 2.1 of the License, or (at your option) any later version.
|
|
292
|
-
|
|
293
|
-
|
|
@@ -29,35 +29,34 @@ Python API for Kiwi TCMS
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
This package allows to connect and access Kiwi TCMS API.
|
|
32
|
-
For more information see
|
|
33
|
-
http://kiwitcms.readthedocs.io/en/latest/api/index.html.
|
|
34
32
|
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
DOCUMENTATION
|
|
35
|
+
-------------
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
https://tcms-api.readthedocs.io/en/latest/modules/tcms_api.html
|
|
40
38
|
|
|
41
|
-
pip install tcms-api
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
CHANGELOG
|
|
41
|
+
---------
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
v12.8 (17 Dec 2023)
|
|
44
|
+
~~~~~~~~~~~~~~~~~~~
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this is usually the case when you install and restart! It must be
|
|
50
|
-
a 64bit installation, see
|
|
51
|
-
`MIT Kerberos for Windows 4.1 <https://web.mit.edu/kerberos/dist/index.html#kfw-4.1>`_
|
|
46
|
+
- When creating a TestPlan limit name to 255 characters
|
|
47
|
+
- When creating a TestCase limit summary to 255 characters
|
|
52
48
|
|
|
53
|
-
**WARNING:** on Linux you will need gcc, Python and kerberos devel packages to
|
|
54
|
-
build ``gssapi`` because it doesn't provide binary packages. Try
|
|
55
|
-
``dnf install gcc krb5-devel python3-devel`` (Red Hat/Fedora) or
|
|
56
|
-
``apt-get install gcc libkrb5-dev libpython3-dev`` (Debian/Ubuntu).
|
|
57
49
|
|
|
50
|
+
v12.7 (10 Dec 2023)
|
|
51
|
+
~~~~~~~~~~~~~~~~~~~
|
|
52
|
+
|
|
53
|
+
- Build & test this package with Python 3.11
|
|
54
|
+
- Replace ``urllib.parse`` functions deprecated since Python 3.8
|
|
55
|
+
- Refactor issues reported by newer version of pylint
|
|
56
|
+
- Refactor issues reported by CodeQL
|
|
57
|
+
- Reformat source code with Black
|
|
58
|
+
- Enable ReadTheDocs CI
|
|
58
59
|
|
|
59
|
-
CHANGELOG
|
|
60
|
-
---------
|
|
61
60
|
|
|
62
61
|
v12.2 (04 Apr 2023)
|
|
63
62
|
~~~~~~~~~~~~~~~~~~~
|
|
@@ -257,7 +256,7 @@ COPYRIGHT
|
|
|
257
256
|
---------
|
|
258
257
|
|
|
259
258
|
- Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
|
260
|
-
- Copyright (c) 2017-
|
|
259
|
+
- Copyright (c) 2017-2023 Kiwi TCMS Project and its contributors. All rights reserved.
|
|
261
260
|
|
|
262
261
|
This library is free software; you can redistribute it and/or
|
|
263
262
|
modify it under the terms of the GNU Lesser General Public
|
tcms-api-12.8/setup.cfg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[flake8]
|
|
2
|
+
max-line-length = 102
|
|
3
|
+
extend-ignore = E203
|
|
4
|
+
|
|
5
|
+
[isort]
|
|
6
|
+
multi_line_output = 3
|
|
7
|
+
include_trailing_comma = True
|
|
8
|
+
force_grid_wrap = 0
|
|
9
|
+
use_parentheses = True
|
|
10
|
+
ensure_newline_before_comments = True
|
|
11
|
+
line_length = 88
|
|
12
|
+
|
|
13
|
+
[pylint]
|
|
14
|
+
max-line-length = 102
|
|
15
|
+
|
|
16
|
+
[egg_info]
|
|
17
|
+
tag_build =
|
|
18
|
+
tag_date = 0
|
|
19
|
+
|
tcms-api-12.8/setup.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
import os
|
|
3
|
+
from setuptools import setup
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def get_version():
|
|
7
|
+
with open(os.path.join("tcms_api", "version.py"), "r") as file:
|
|
8
|
+
version = file.read()
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
version.replace(" ", "")
|
|
12
|
+
.replace("__version__=", "")
|
|
13
|
+
.strip()
|
|
14
|
+
.strip("'")
|
|
15
|
+
.strip('"')
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def get_install_requires(path):
|
|
20
|
+
requires = []
|
|
21
|
+
|
|
22
|
+
with open(path, "r") as file:
|
|
23
|
+
for line in file:
|
|
24
|
+
if line.startswith("-r "):
|
|
25
|
+
continue
|
|
26
|
+
requires.append(line.strip())
|
|
27
|
+
return requires
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
with open("README.rst") as readme:
|
|
31
|
+
LONG_DESCRIPTION = readme.read()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
setup(
|
|
35
|
+
name="tcms-api",
|
|
36
|
+
version=get_version(),
|
|
37
|
+
packages=["tcms_api"],
|
|
38
|
+
description="Python API for Kiwi",
|
|
39
|
+
long_description=LONG_DESCRIPTION,
|
|
40
|
+
long_description_content_type="text/x-rst",
|
|
41
|
+
maintainer="Kiwi TCMS",
|
|
42
|
+
maintainer_email="info@kiwitcms.org",
|
|
43
|
+
license="LGPLv2+",
|
|
44
|
+
url="https://github.com/kiwitcms/tcms-api",
|
|
45
|
+
python_requires=">=3.6",
|
|
46
|
+
install_requires=get_install_requires("requirements.txt"),
|
|
47
|
+
extras_require={
|
|
48
|
+
"gssapi": ["gssapi"],
|
|
49
|
+
},
|
|
50
|
+
classifiers=[
|
|
51
|
+
"Development Status :: 5 - Production/Stable",
|
|
52
|
+
"Environment :: Console",
|
|
53
|
+
"Intended Audience :: Developers",
|
|
54
|
+
"Intended Audience :: System Administrators",
|
|
55
|
+
"License :: OSI Approved :: GNU Lesser General Public License v2"
|
|
56
|
+
+ " or later (LGPLv2+)",
|
|
57
|
+
"Operating System :: POSIX",
|
|
58
|
+
"Programming Language :: Python",
|
|
59
|
+
"Programming Language :: Python :: 3.8",
|
|
60
|
+
"Programming Language :: Python :: 3.9",
|
|
61
|
+
"Programming Language :: Python :: 3.11",
|
|
62
|
+
"Topic :: Software Development",
|
|
63
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
64
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
65
|
+
"Topic :: Software Development :: Testing",
|
|
66
|
+
],
|
|
67
|
+
)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
2
2
|
#
|
|
3
3
|
# Python API for the Kiwi TCMS test case management system.
|
|
4
|
+
#
|
|
4
5
|
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
|
5
6
|
# Author: Petr Splichal <psplicha@redhat.com>
|
|
6
7
|
#
|
|
7
|
-
# Copyright (c) 2018,2020-
|
|
8
|
+
# Copyright (c) 2018,2020-2023 Kiwi TCMS project. All rights reserved.
|
|
8
9
|
# Author: Alexander Todorov <info@kiwitcms.org>
|
|
9
10
|
#
|
|
10
11
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
@@ -25,10 +26,28 @@
|
|
|
25
26
|
This module provides a dictionary based Python interface for the
|
|
26
27
|
Kiwi TCMS test management system. It operates via the XML-RPC protocol.
|
|
27
28
|
|
|
29
|
+
|
|
28
30
|
Installation::
|
|
29
31
|
|
|
30
32
|
pip install tcms-api
|
|
31
33
|
|
|
34
|
+
|
|
35
|
+
If you want to use Kerberos then::
|
|
36
|
+
|
|
37
|
+
pip install tcms-api[gssapi]
|
|
38
|
+
|
|
39
|
+
**WARNING:** on Windows you need to install MIT Kerberos and make sure
|
|
40
|
+
``C:\\Program Files\\MIT\\Kerberos\\bin`` is included in ``%PATH%`` -
|
|
41
|
+
this is usually the case when you install and restart! It must be
|
|
42
|
+
a 64bit installation, see
|
|
43
|
+
`MIT Kerberos for Windows 4.1 <https://web.mit.edu/kerberos/dist/index.html#kfw-4.1>`_
|
|
44
|
+
|
|
45
|
+
**WARNING:** on Linux you will need gcc, Python and kerberos devel packages to
|
|
46
|
+
build ``gssapi`` because it doesn't provide binary packages via PyPI. Try
|
|
47
|
+
``dnf install gcc krb5-devel python3-devel`` (Red Hat/Fedora) or
|
|
48
|
+
``apt-get install gcc libkrb5-dev libpython3-dev`` (Debian/Ubuntu).
|
|
49
|
+
|
|
50
|
+
|
|
32
51
|
Minimal config file ``~/.tcms.conf``::
|
|
33
52
|
|
|
34
53
|
[tcms]
|
|
@@ -82,7 +101,7 @@ Connect to backend::
|
|
|
82
101
|
"""
|
|
83
102
|
import os
|
|
84
103
|
from configparser import ConfigParser
|
|
85
|
-
from distutils.util import strtobool
|
|
104
|
+
from distutils.util import strtobool # pylint: disable=deprecated-module
|
|
86
105
|
|
|
87
106
|
from tcms_api.xmlrpc import TCMSXmlrpc, TCMSKerbXmlrpc
|
|
88
107
|
|
|
@@ -107,28 +126,31 @@ class TCMS: # pylint: disable=too-few-public-methods
|
|
|
107
126
|
if not os.path.exists(self._path):
|
|
108
127
|
self._path = "c:/tcms.conf"
|
|
109
128
|
if not os.path.exists(self._path):
|
|
110
|
-
raise
|
|
129
|
+
raise RuntimeError(f"Config file '{self._path}' not found")
|
|
111
130
|
|
|
112
131
|
config = ConfigParser()
|
|
113
132
|
config.read(self._path)
|
|
114
133
|
|
|
115
|
-
|
|
134
|
+
rpc_implementor = None
|
|
135
|
+
server_url = self.server_url(config)
|
|
136
|
+
if strtobool(config["tcms"].get("use_kerberos", "False")):
|
|
116
137
|
# use Kerberos
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
rpc_implementor = TCMSKerbXmlrpc(None, None, server_url)
|
|
139
|
+
else:
|
|
140
|
+
try:
|
|
141
|
+
# use password authentication
|
|
142
|
+
rpc_implementor = TCMSXmlrpc(
|
|
143
|
+
config["tcms"]["username"],
|
|
144
|
+
config["tcms"]["password"],
|
|
145
|
+
server_url,
|
|
146
|
+
)
|
|
147
|
+
except KeyError as err:
|
|
148
|
+
raise RuntimeError(
|
|
149
|
+
f"username/password required in {self._path}"
|
|
150
|
+
) from err
|
|
151
|
+
|
|
152
|
+
rpc_implementor.login()
|
|
153
|
+
TCMS._connection = rpc_implementor.server
|
|
132
154
|
|
|
133
155
|
return
|
|
134
156
|
|
|
@@ -146,8 +168,8 @@ class TCMS: # pylint: disable=too-few-public-methods
|
|
|
146
168
|
"""
|
|
147
169
|
# Make sure the server URL is set
|
|
148
170
|
try:
|
|
149
|
-
config[
|
|
171
|
+
config["tcms"]["url"] is not None
|
|
150
172
|
except (KeyError, AttributeError) as err:
|
|
151
|
-
raise
|
|
173
|
+
raise RuntimeError(f"No url found in {self._path}") from err
|
|
152
174
|
|
|
153
|
-
return config[
|
|
175
|
+
return config["tcms"]["url"].replace("json-rpc", "xml-rpc")
|