Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer comments (using the improved OBS markup) for (un)select #167

Merged
merged 1 commit into from Jun 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion osclib/stagingapi.py
Expand Up @@ -1103,6 +1103,6 @@ def update_status_comments(self, project, command):
if not author:
# Old style metadata
author = get_request(self.apiurl, str(req['id'])).get_creator()
lines.append(' * Request req#%s for package %s submitted by [AT]%s' % (req['id'], req['package'], author))
lines.append(' * Request#%s for package %s submitted by [AT]%s' % (req['id'], req['package'], author))
msg = '\n'.join(lines)
comment_api.add_comment(project_name=project, comment=msg)
6 changes: 3 additions & 3 deletions tests/select_tests.py
Expand Up @@ -43,7 +43,7 @@ def test_select_comments(self):
# Only one comment is added
self.assertEqual(len(first_select_comments), len(comments) + 1)
# With the right content
self.assertTrue('Request req#123 for package gcc submitted by [AT]Admin' in first_select_comment['comment'])
self.assertTrue('Request#123 for package gcc submitted by [AT]Admin' in first_select_comment['comment'])

# Second select
self.assertEqual(True, SelectCommand(self.api).perform(staging_a, ['puppet']))
Expand All @@ -54,8 +54,8 @@ def test_select_comments(self):
self.assertEqual(len(second_select_comments), len(first_select_comments))
self.assertNotEqual(second_select_comment['comment'], first_select_comment['comment'])
# The new comments contents both old and new information
self.assertTrue('Request req#123 for package gcc submitted by [AT]Admin' in second_select_comment['comment'])
self.assertTrue('Request req#321 for package puppet submitted by [AT]Admin' in second_select_comment['comment'])
self.assertTrue('Request#123 for package gcc submitted by [AT]Admin' in second_select_comment['comment'])
self.assertTrue('Request#321 for package puppet submitted by [AT]Admin' in second_select_comment['comment'])

def test_no_matches(self):
# search for requests
Expand Down