Skip to content

Commit bd58e0d

Browse files
author
Luiko Czub
committed
disable sample uploadTestCaseAttachment #150
known issue running against TL 1.9.19
1 parent 82102b3 commit bd58e0d

File tree

3 files changed

+46
-38
lines changed

3 files changed

+46
-38
lines changed

example/TestLinkExample.py

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -725,31 +725,35 @@
725725
response = myTestLink.getTestCaseByVersion(newTestCaseID_B)
726726
print('getTestCaseByVersion vNone', response)
727727

728-
# add png file as Attachment to test case B version 1
729-
a_file=open(NEWATTACHMENT_PNG, mode='rb')
730-
newAttachment = myTestLink.uploadTestCaseAttachment(a_file, newTestCaseID_B, 1,
731-
title='PNG Example v1', description='PNG Attachment Example for a TestCase v1')
732-
print("uploadTestCaseAttachment v1", newAttachment)
733-
# add py file as Attachment to test case B version 2
734-
a_file=open(NEWATTACHMENT_PY, mode='rb')
735-
newAttachment = myTestLink.uploadTestCaseAttachment(a_file, newTestCaseID_B, 2,
736-
title='Textfile Example v2', description='Text Attachment Example for a TestCase v2')
737-
print("uploadTestCaseAttachment v2", newAttachment)
738-
739-
# get Attachment of test case B v1
740-
# response = myTestLink.getTestCaseAttachments(testcaseexternalid=tc_aa_full_ext_id)
741-
# print "getTestCaseAttachments", response
742-
response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B, version=1)
743-
print("getTestCaseAttachments v1", response)
744-
745-
# get Attachment of test case B - last version
746-
# response = myTestLink.getTestCaseAttachments(testcaseexternalid=tc_aa_full_ext_id)
747-
# print "getTestCaseAttachments", response
748-
response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B, version=2)
749-
attachment_id = list(response)[0]
750-
print("getTestCaseAttachments v2", response[attachment_id]['title'])
751-
response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B)
752-
print("getTestCaseAttachments vNone", response[attachment_id]['name'])
728+
#FIXME: know 1.9.19 issue
729+
# E_WARNING base64_decode() expects parameter 1 to be string, array given
730+
# - in /var/www/html/lib/api/xmlrpc/v1/xmlrpc.class.php - Line 5103
731+
#
732+
# # add png file as Attachment to test case B version 1
733+
# a_file=open(NEWATTACHMENT_PNG, mode='rb')
734+
# newAttachment = myTestLink.uploadTestCaseAttachment(a_file, newTestCaseID_B, 1,
735+
# title='PNG Example v1', description='PNG Attachment Example for a TestCase v1')
736+
# print("uploadTestCaseAttachment v1", newAttachment)
737+
# # add py file as Attachment to test case B version 2
738+
# a_file=open(NEWATTACHMENT_PY, mode='rb')
739+
# newAttachment = myTestLink.uploadTestCaseAttachment(a_file, newTestCaseID_B, 2,
740+
# title='Textfile Example v2', description='Text Attachment Example for a TestCase v2')
741+
# print("uploadTestCaseAttachment v2", newAttachment)
742+
#
743+
# # get Attachment of test case B v1
744+
# # response = myTestLink.getTestCaseAttachments(testcaseexternalid=tc_aa_full_ext_id)
745+
# # print "getTestCaseAttachments", response
746+
# response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B, version=1)
747+
# print("getTestCaseAttachments v1", response)
748+
#
749+
# # get Attachment of test case B - last version
750+
# # response = myTestLink.getTestCaseAttachments(testcaseexternalid=tc_aa_full_ext_id)
751+
# # print "getTestCaseAttachments", response
752+
# response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B, version=2)
753+
# attachment_id = list(response)[0]
754+
# print("getTestCaseAttachments v2", response[attachment_id]['title'])
755+
# response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B)
756+
# print("getTestCaseAttachments vNone", response[attachment_id]['name'])
753757

754758

755759
# copy test case - as new TC in a different TestSuite

example/TestLinkExampleGenericApi.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -714,18 +714,22 @@
714714
response = myTestLink.getTestSuiteAttachments(newTestSuiteID_A)
715715
print("getTestSuiteAttachments", response)
716716

717-
# add png file as Attachment to test case B
718-
a_file=open(NEWATTACHMENT_PNG, mode='rb')
719-
newAttachment = myTestLink.uploadTestCaseAttachment(a_file, newTestCaseID_B, 1,
720-
title='PNG Example', description='PNG Attachment Example for a TestCase')
721-
print("uploadTestCaseAttachment", newAttachment)
722-
# get Attachment of test case B
723-
# response = myTestLink.getTestCaseAttachments(testcaseexternalid=tc_aa_full_ext_id)
724-
# print "getTestCaseAttachments", response
725-
response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B, version=1)
726-
print("getTestCaseAttachments v1", response)
727-
response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B)
728-
print("getTestCaseAttachments vNone", response)
717+
# FIXME: know 1.9.19 issue
718+
# E_WARNING base64_decode() expects parameter 1 to be string, array given
719+
# - in /var/www/html/lib/api/xmlrpc/v1/xmlrpc.class.php - Line 5103
720+
#
721+
# # add png file as Attachment to test case B
722+
# a_file=open(NEWATTACHMENT_PNG, mode='rb')
723+
# newAttachment = myTestLink.uploadTestCaseAttachment(a_file, newTestCaseID_B, 1,
724+
# title='PNG Example', description='PNG Attachment Example for a TestCase')
725+
# print("uploadTestCaseAttachment", newAttachment)
726+
# # get Attachment of test case B
727+
# # response = myTestLink.getTestCaseAttachments(testcaseexternalid=tc_aa_full_ext_id)
728+
# # print "getTestCaseAttachments", response
729+
# response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B, version=1)
730+
# print("getTestCaseAttachments v1", response)
731+
# response = myTestLink.getTestCaseAttachments(testcaseid=newTestCaseID_B)
732+
# print("getTestCaseAttachments vNone", response)
729733

730734
# get requirements for the test project - empty result
731735
response = myTestLink.getRequirements(newProjectID)

src/testlink/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# ------------------------------------------------------------------------
1919

2020
VERSION = '0.8.2-dev139'
21-
TL_RELEASE = '1.9.20-fixed'
21+
TL_RELEASE = '1.9.20-fixed_c88e348ce'

0 commit comments

Comments
 (0)