|
725 | 725 | response = myTestLink.getTestCaseByVersion(newTestCaseID_B)
|
726 | 726 | print('getTestCaseByVersion vNone', response)
|
727 | 727 |
|
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']) |
753 | 757 |
|
754 | 758 |
|
755 | 759 | # copy test case - as new TC in a different TestSuite
|
|
0 commit comments