diff --git a/tests/test_progitlib.py b/tests/test_progitlib.py index 7bf3dd1..4987d9e 100644 --- a/tests/test_progitlib.py +++ b/tests/test_progitlib.py @@ -262,6 +262,32 @@ class ProgitLibtests(tests.Modeltests): @patch('progit.lib.git.update_git_ticket') @patch('progit.lib.notify.send_email') + def test_remove_issue_tags(self, p_send_email, p_ugt): + """ Test the remove_issue_tags of progit.lib. """ + p_send_email.return_value = True + p_ugt.return_value = True + + self.test_add_issue_tag() + repo = progit.lib.get_project(self.session, 'test') + issue = progit.lib.search_issues(self.session, repo, issueid=1) + + self.assertRaises( + progit.exceptions.ProgitException, + progit.lib.remove_issue_tags, + session=self.session, + project=repo, + tags='foo') + + msgs = progit.lib.remove_issue_tags( + session=self.session, + project=repo, + tags='tag1') + + self.assertEqual(msgs, [u'Removed tag: tag1']) + + + @patch('progit.lib.git.update_git_ticket') + @patch('progit.lib.notify.send_email') def test_search_issues(self, p_send_email, p_ugt): """ Test the search_issues of progit.lib. """ p_send_email.return_value = True