diff --git a/tests/test_progitlib.py b/tests/test_progitlib.py index e620a3f..b8108d9 100644 --- a/tests/test_progitlib.py +++ b/tests/test_progitlib.py @@ -243,6 +243,16 @@ class ProgitLibtests(tests.Modeltests): self.session.commit() self.assertEqual(msg, 'Tag added') + # Try a second time + msg = progit.lib.add_issue_tag( + session=self.session, + issue=issue, + tag='tag1', + user='pingou', + ticketfolder=None) + self.session.commit() + self.assertEqual(msg, 'Tag already present: tag1') + issues = progit.lib.search_issues(self.session, repo, tags='tag1') self.assertEqual(len(issues), 1) self.assertEqual(issues[0].id, 1)