@@ -314,78 +314,6 @@ def test_new_issue_with_limit_view_label(self):
314314 mock .call ().execute (http = None , num_retries = 3 ),
315315 ])
316316
317- def test_new_issue_with_os_foundin_releaseblock_labels (self ):
318- """Test new issue creation with os, foundin, releaseblock labels."""
319- issue = self .issue_tracker .new_issue ()
320- issue .
reporter = '[email protected] ' 321- issue .
assignee = '[email protected] ' 322- issue .body = 'issue body'
323- issue .
ccs .
add (
'[email protected] ' )
324- issue .labels .add ('12345' )
325- issue .labels .add ('OS-Linux' )
326- issue .labels .add ('OS-Android' )
327- issue .labels .add ('FoundIn-123' )
328- issue .labels .add ('FoundIn-789' )
329- issue .labels .add ('ReleaseBlock-Dev' )
330- issue .labels .add ('ReleaseBlock-Beta' )
331- issue .status = 'ASSIGNED'
332- issue .title = 'issue title'
333- issue .save ()
334- self .client .issues ().create .assert_has_calls ([
335- mock .call (
336- body = {
337- 'issueState' : {
338- 'componentId' :
339- 1337 ,
340- 'ccs' : [{
341- 'emailAddress' :
'[email protected] ' 342- }],
343- 'collaborators' : [],
344- 'hotlistIds' : [12345 ],
345- 'accessLimit' : {
346- 'accessLevel' : issue_tracker .IssueAccessLevel .LIMIT_NONE
347- },
348- 'reporter' : {
349- 'emailAddress' :
'[email protected] ' 350- },
351- 'assignee' : {
352- 'emailAddress' :
'[email protected] ' 353- },
354- 'status' :
355- 'ASSIGNED' ,
356- 'title' :
357- 'issue title' ,
358- 'type' :
359- 'BUG' ,
360- 'customFields' : [
361- {
362- 'customFieldId' : '1223084' ,
363- 'repeatedEnumValue' : {
364- 'values' : ['Android' , 'Linux' ]
365- }
366- },
367- {
368- 'customFieldId' : '1223086' ,
369- 'repeatedEnumValue' : {
370- 'values' : ['Dev' , 'Beta' ]
371- }
372- },
373- ],
374- 'foundInVersions' : ['123' , '789' ],
375- 'severity' :
376- 'S4' ,
377- 'priority' :
378- 'P4' ,
379- },
380- 'issueComment' : {
381- 'comment' : 'issue body'
382- },
383- },
384- templateOptions_applyTemplate = True ,
385- ),
386- mock .call ().execute (http = None , num_retries = 3 ),
387- ])
388-
389317 def test_new_issue_with_empty_os_label (self ):
390318 """Test new issue creation with "empty" OS label."""
391319 issue = self .issue_tracker .new_issue ()
@@ -653,123 +581,6 @@ def test_update_issue(self):
653581 mock .call ().execute (http = None , num_retries = 3 ),
654582 ])
655583
656- def test_update_issue_with_os_foundin_releaseblock_labels (self ):
657- """Test updating an existing issue with OS and FoundIn labels."""
658- self .client .issues ().get ().execute .return_value = {
659- 'issueId' : '68828938' ,
660- 'issueState' : {
661- 'componentId' :
662- '29002' ,
663- 'type' :
664- 'BUG' ,
665- 'customFields' : [
666- {
667- 'customFieldId' : '1223084' ,
668- 'repeatedEnumValue' : {
669- 'values' : ['Linux' ] # Existing OS-Linux.
670- },
671- },
672- {
673- 'customFieldId' : '1223086' ,
674- 'repeatedEnumValue' : {
675- 'values' : ['Dev' ] # Existing ReleaseBlock-Dev.
676- },
677- },
678- ],
679- 'status' :
680- 'NEW' ,
681- 'priority' :
682- 'P2' ,
683- 'severity' :
684- 'S2' ,
685- 'title' :
686- 'test' ,
687- 'reporter' : {
688- 'emailAddress' :
'[email protected] ' ,
689- 'userGaiaStatus' : 'ACTIVE'
690- },
691- 'assignee' : {
692- 'emailAddress' :
'[email protected] ' ,
693- 'userGaiaStatus' : 'ACTIVE'
694- },
695- 'retention' :
696- 'COMPONENT_DEFAULT' ,
697- 'foundInVersions' : ['123' ], # Existing FoundIn-123.
698- },
699- 'createdTime' : '2019-06-25T01:29:30.021Z' ,
700- 'modifiedTime' : '2019-06-25T01:29:30.021Z' ,
701- 'userData' : {},
702- 'accessLimit' : {
703- 'accessLevel' : 'INTERNAL'
704- },
705- 'etag' : 'TmpnNE1qZzVNemd0TUMweA==' ,
706- 'lastModifier' : {
707- 'emailAddress' :
'[email protected] ' ,
708- 'userGaiaStatus' : 'ACTIVE'
709- },
710- }
711- issue = self .issue_tracker .get_issue (68828938 )
712- issue .
reporter = '[email protected] ' 713- issue .
assignee = '[email protected] ' 714- issue .
ccs .
add (
'[email protected] ' )
715- issue .labels .add ('12345' )
716- issue .status = 'ASSIGNED'
717- issue .title = 'issue title2'
718- # Adding OS Android here (in addition to the Linux already set).
719- issue .labels .add ('OS-Android' )
720- # Adding FoundIn 789 here (in addition to the 123 already set).
721- issue .labels .add ('FoundIn-789' )
722- # Adding ReleaseBlock Beta and Stable (in addition to Dev already set).
723- issue .labels .add ('ReleaseBlock-Beta' )
724- issue .labels .add ('ReleaseBlock-Stable' )
725- issue .save ()
726-
727- self .client .issues ().modify .assert_has_calls ([
728- mock .call (
729- issueId = '68828938' ,
730- body = {
731- 'add' : {
732- 'status' :
733- 'ASSIGNED' ,
734- 'assignee' : {
735- 'emailAddress' :
'[email protected] ' 736- },
737- 'reporter' : {
738- 'emailAddress' :
'[email protected] ' 739- },
740- 'title' :
741- 'issue title2' ,
742- 'ccs' : [{
743- 'emailAddress' :
'[email protected] ' 744- }],
745- 'customFields' : [
746- {
747- 'customFieldId' : '1223084' ,
748- 'repeatedEnumValue' : {
749- 'values' : ['Android' , 'Linux' ]
750- }
751- },
752- {
753- 'customFieldId' : '1223086' ,
754- 'repeatedEnumValue' : {
755- 'values' : ['Dev' , 'Beta' , 'Stable' ]
756- }
757- },
758- ],
759- 'foundInVersions' : ['123' , '789' ],
760- },
761- 'addMask' :
762- 'status,assignee,reporter,title,ccs,customFields,foundInVersions' ,
763- 'remove' : {},
764- 'removeMask' :
765- '' ,
766- 'significanceOverride' :
767- 'MAJOR' ,
768- },
769- ),
770- mock .call ().execute (http = None , num_retries = 3 ),
771- ])
772-
773584 def test_update_issue_with_empty_os (self ):
774585 """Test updating an existing issue with an "empty" OS label."""
775586 self .client .issues ().get ().execute .return_value = {
0 commit comments