qase-python-commons 3.5.7__py3-none-any.whl → 4.0.0__py3-none-any.whl
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.
Potentially problematic release.
This version of qase-python-commons might be problematic. Click here for more details.
- qase/commons/models/attachment.py +11 -8
- {qase_python_commons-3.5.7.dist-info → qase_python_commons-4.0.0.dist-info}/METADATA +5 -6
- {qase_python_commons-3.5.7.dist-info → qase_python_commons-4.0.0.dist-info}/RECORD +5 -5
- {qase_python_commons-3.5.7.dist-info → qase_python_commons-4.0.0.dist-info}/WHEEL +0 -0
- {qase_python_commons-3.5.7.dist-info → qase_python_commons-4.0.0.dist-info}/top_level.txt +0 -0
|
@@ -29,16 +29,19 @@ class Attachment(BaseModel):
|
|
|
29
29
|
def get_id(self) -> str:
|
|
30
30
|
return self.id
|
|
31
31
|
|
|
32
|
-
def get_for_upload(self) ->
|
|
32
|
+
def get_for_upload(self) -> tuple:
|
|
33
|
+
"""Returns attachment data in format expected by new API client: (filename, filedata)"""
|
|
34
|
+
|
|
33
35
|
if self.file_path:
|
|
34
36
|
with open(self.file_path, "rb") as fc:
|
|
35
|
-
|
|
37
|
+
filedata = fc.read()
|
|
36
38
|
else:
|
|
37
39
|
if isinstance(self.content, str):
|
|
38
|
-
|
|
40
|
+
filedata = bytes(self.content, 'utf-8')
|
|
39
41
|
elif isinstance(self.content, bytes):
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
filedata = self.content
|
|
43
|
+
else:
|
|
44
|
+
# Handle case where content is not str or bytes (e.g., JSON serialized)
|
|
45
|
+
filedata = bytes(self.content, 'utf-8')
|
|
46
|
+
|
|
47
|
+
return (self.file_name, filedata)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: A library for Qase TestOps and Qase Report
|
|
5
5
|
Author-email: Qase Team <support@qase.io>
|
|
6
6
|
Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/main/qase-python-commons
|
|
@@ -12,18 +12,17 @@ Classifier: Topic :: Software Development :: Quality Assurance
|
|
|
12
12
|
Classifier: Topic :: Software Development :: Testing
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Requires-Python: >=3.9
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
Requires-Dist: certifi>=2024.2.2
|
|
24
23
|
Requires-Dist: attrs>=23.2.0
|
|
25
|
-
Requires-Dist: qase-api-client~=
|
|
26
|
-
Requires-Dist: qase-api-v2-client~=
|
|
24
|
+
Requires-Dist: qase-api-client~=2.0.0
|
|
25
|
+
Requires-Dist: qase-api-v2-client~=2.0.0
|
|
27
26
|
Requires-Dist: more_itertools
|
|
28
27
|
Provides-Extra: testing
|
|
29
28
|
Requires-Dist: pytest; extra == "testing"
|
|
@@ -8,7 +8,7 @@ qase/commons/client/api_v2_client.py,sha256=GsIrXJcBw6GtzvJjbjMYa0tvUIxEEe4pALRN
|
|
|
8
8
|
qase/commons/client/base_api_client.py,sha256=qiK93rXXeLOmp6e3cgsLA4lmrV_rCL1BIi_xUeqFrDE,2613
|
|
9
9
|
qase/commons/exceptions/reporter.py,sha256=dP-Mwcq8HKBOjgu3YqhyULDmDGU09BmT6Fh9HjICaUc,45
|
|
10
10
|
qase/commons/models/__init__.py,sha256=FTt5dYASBX4r6-tQi-_JAUVx4uvJs9GTxROdAZEV6Jo,272
|
|
11
|
-
qase/commons/models/attachment.py,sha256=
|
|
11
|
+
qase/commons/models/attachment.py,sha256=cGfB0BaTDVfA7euJubKvi2cXXNvlSm_dy5x-ak3H3ec,1625
|
|
12
12
|
qase/commons/models/basemodel.py,sha256=0j8E-LE6hxAKQPYLNM9qThor9s2ZndZys_kibeoLImo,426
|
|
13
13
|
qase/commons/models/external_link.py,sha256=bdXj7pNHHkfb3dcYtXN8sNp-HFxHvZeYz8QIPGcvX0w,1317
|
|
14
14
|
qase/commons/models/relation.py,sha256=HymHeh1uBcoQnTs4Vra7WJ_KFkhryj5o7cShjoGQImI,511
|
|
@@ -36,7 +36,7 @@ qase/commons/reporters/testops.py,sha256=uph_8upIt5bu4ncqyK7ehXR9NqtpZ34wGUBFLVJ
|
|
|
36
36
|
qase/commons/util/__init__.py,sha256=0sRRfrMOIPCHpk9tXM94Pj10qrk18B61qEcbLpRjw_I,74
|
|
37
37
|
qase/commons/util/host_data.py,sha256=n8o5PDs8kELCZZ5GR7Jug6LsgZHWJudU7iRmZHRdrlw,5264
|
|
38
38
|
qase/commons/validators/base.py,sha256=wwSn-4YiuXtfGMGnSKgo9Vm5hAKevVmmfd2Ro6Q7MYQ,173
|
|
39
|
-
qase_python_commons-
|
|
40
|
-
qase_python_commons-
|
|
41
|
-
qase_python_commons-
|
|
42
|
-
qase_python_commons-
|
|
39
|
+
qase_python_commons-4.0.0.dist-info/METADATA,sha256=i3e1yWuvsf7RkNj4zWPVbER7RikCOgaPsBirjLVhVqo,1808
|
|
40
|
+
qase_python_commons-4.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
41
|
+
qase_python_commons-4.0.0.dist-info/top_level.txt,sha256=Mn5aFk7H7Uia4s1NRDsvebu8vCrFy9nOuRIBfkIY5kQ,5
|
|
42
|
+
qase_python_commons-4.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|