Closed
Description
executing TestLinkExampleGenericApi.py and TestLinkExample.py under py33 and py34 fails with
...
getTestCaseBugs TC_AA in TP_A (TC is not executed) [{'id': -1}]
reportTCResult [{'message': 'Success!', 'status': True, 'overwrite': False, 'id': '1145', 'operation': 'reportTCResult'}]
getTestCaseBugs TC_AA in TP_A (TC is executed, no bug) [{'bugs': []}]
reportTCResult [{'message': 'Success!', 'status': True, 'overwrite': False, 'id': '1146', 'operation': 'reportTCResult'}]
reportTCResult [{'message': 'Success!', 'status': True, 'overwrite': False, 'id': '1147', 'operation': 'reportTCResult'}]
Traceback (most recent call last):
File "D:\Projekte\git\TestLink-API-Python-client\.tox\py34\lib\base64.py", line 519, in _input_type_check
m = memoryview(s)
TypeError: memoryview: str object does not have the buffer interface
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "example\TestLinkExample.py", line 483, in <module>
filename='MyPyExampleApiClient.py')
File "D:\Projekte\git\TestLink-API-Python-client\.tox\py34\lib\site-packages\testlink\testlinkdecorators.py", line 156, in wrapperAddAttachment
argsAttachment = self._getAttachmentArgs(attachmentfile)
File "D:\Projekte\git\TestLink-API-Python-client\.tox\py34\lib\site-packages\testlink\testlinkapigeneric.py", line 1241, in _getAttachmentArgs
'content':base64.encodestring(attachmentfile.read())
File "D:\Projekte\git\TestLink-API-Python-client\.tox\py34\lib\base64.py", line 548, in encodestring
return encodebytes(s)
File "D:\Projekte\git\TestLink-API-Python-client\.tox\py34\lib\base64.py", line 536, in encodebytes
_input_type_check(s)
File "D:\Projekte\git\TestLink-API-Python-client\.tox\py34\lib\base64.py", line 522, in _input_type_check
raise TypeError(msg) from err
TypeError: expected bytes-like object, not str
ERROR: InvocationError: 'D:\\Projekte\\git\\TestLink-API-Python-client\\.tox\\py34\\Scripts\\python.EXE example\\TestLinkExample.py'
Reproduction:
call tox with commit 034e995