Beispiel #1
0
    def test_update_branches_with_issues_empty_branches(self):
        branches = []
        issues = [Issue('CFY-3223', 'Resolved')]

        expected_branches = []

        Branch.update_branches_with_issues(branches, issues)
        self.assertEqual(branches, expected_branches)
Beispiel #2
0
    def test_update_branches_with_issues_empty_issues(self):
        branches = [Branch(u'CFY-3223-allow-external-rabbitmq',
                           Repo(u'cloudify-manager',
                                org=Organization(u'cloudify-cosmo')))
                    ]
        issues = []

        expected_branches = [Branch(u'CFY-3223-allow-external-rabbitmq',
                                    Repo(u'cloudify-manager',
                                         org=Organization(u'cloudify-cosmo')))
                             ]

        Branch.update_branches_with_issues(branches, issues)
        self.assertEqual(branches, expected_branches)
Beispiel #3
0
    def test_update_branches_with_issues(self):
        branches = [Branch(u'CFY-3223-allow-external-rabbitmq',
                           Repo(u'cloudify-manager',
                                org=Organization(u'cloudify-cosmo'))),
                    Branch(u'CFY-3502-ngmin-faster',
                           Repo(u'cloudify-ui',
                                org=Organization(u'cloudify-cosmo')))]

        issues = [Issue('CFY-3223', 'Resolved'),
                  Issue('CFY-3502', 'Closed')]

        expected_branches = [Branch(u'CFY-3223-allow-external-rabbitmq',
                                    Repo(u'cloudify-manager',
                                         org=Organization(u'cloudify-cosmo')),
                                    jira_issue=Issue('CFY-3223', 'Resolved')),
                             Branch(u'CFY-3502-ngmin-faster',
                                    Repo(u'cloudify-ui',
                                         org=Organization(u'cloudify-cosmo')),
                                    jira_issue=Issue('CFY-3502', 'Closed'))
                             ]
        Branch.update_branches_with_issues(branches, issues)
        self.assertEqual(branches, expected_branches)