def test__resolve_conflicting_platform_branches__multi_beta(self): branches = [ { 'PlatformName': 'Python', 'BranchName': 'Python 3.6 running on 64bit Amazon Linux', 'LifecycleState': 'Retired' }, { 'PlatformName': 'Python', 'BranchName': 'Python 3.6 running on 64bit Amazon Linux', 'LifecycleState': 'Beta' }, { 'PlatformName': 'OtherFamily', 'BranchName': 'Python 3.6 running on 64bit Amazon Linux', 'LifecycleState': 'Beta' }, { 'PlatformName': 'Python', 'BranchName': 'Python 3.6 running on 64bit Amazon Linux', 'LifecycleState': 'Deprecated' }, { 'PlatformName': 'Python', 'BranchName': 'Python 3.6 running on 64bit Amazon Linux', 'LifecycleState': 'Deprecated' }, ] expected = branches[1] result = platform_branch_ops._resolve_conflicting_platform_branches( branches) self.assertEqual(result, expected)
def test__resolve_conflicting_platform_branches__only_retired(self): branches = [ { 'PlatformName': 'Python', 'BranchName': 'Python 3.6 running on 64bit Amazon Linux', 'LifecycleState': 'Retired' }, ] expected = branches[0] result = platform_branch_ops._resolve_conflicting_platform_branches( branches) self.assertEqual(result, expected)
def test__resolve_conflicting_platform_branches(self): branches = [ { 'BranchName': 'PHP 7.1', 'LifecycleState': 'Deprecated', }, { 'BranchName': 'PHP 7.3', 'LifecycleState': 'Supported', }, { 'BranchName': 'PHP 7.2', 'LifecycleState': 'Deprecated', }, ] expected = branches[1] result = platform_branch_ops._resolve_conflicting_platform_branches( branches) self.assertEqual(expected, result)