diff --git a/elastic_recheck/elasticRecheck.py b/elastic_recheck/elasticRecheck.py index 946b1453..4e4f28ee 100755 --- a/elastic_recheck/elasticRecheck.py +++ b/elastic_recheck/elasticRecheck.py @@ -265,7 +265,7 @@ For a code review which has been approved but failed to merge, you can reverify by leaving a comment like this: reverify bug %(bug)s""" % {'bugs': "\n- ".join(bug_urls), - 'bug': bugs[0]} + 'bug': list(bugs)[0]} else: message = ("I noticed tempest failed, refer to: " "https://wiki.openstack.org/wiki/" diff --git a/elastic_recheck/tests/functional/test_gerrit_comment.py b/elastic_recheck/tests/functional/test_gerrit_comment.py index ec036c0d..739dc363 100644 --- a/elastic_recheck/tests/functional/test_gerrit_comment.py +++ b/elastic_recheck/tests/functional/test_gerrit_comment.py @@ -33,7 +33,7 @@ class TestGerritComment(testtools.TestCase): self.gerrit = gerritlib.gerrit.Gerrit(host, self.user, port) def test_bug_found(self): - bug_numbers = ['1223158'] + bug_numbers = set(['1223158']) project = 'gtest-org/test' commit_id = '434,1' commit = '434' @@ -47,10 +47,10 @@ class TestGerritComment(testtools.TestCase): comment.get('message')) def test_bugs_found(self): - bug_numbers = ['1223158', '424242'] + bug_numbers = set(['1223158', '424242']) project = 'gtest-org/test' - commit_id = '434,1' - commit = '434' + commit_id = '781,1' + commit = '781' self.stream.leave_comment(project, commit_id, bug_numbers) result = self.gerrit.query(commit, comments=True) comments = result.get('comments')