def test_watch_toggle_issue(self):
        issue = test_data.create_dummy_issue()
        user = issue.createdByUser

        self.assertTrue(not watch_services.is_watching_issue(user, issue.id))

        watch_services.watch_issue(user, issue.id, IssueWatch.WATCHED)
        self.assertTrue(watch_services.is_watching_issue(user, issue.id))

        watch_services.unwatch_issue(user, issue.id)
        self.assertTrue(not watch_services.is_watching_issue(user, issue.id))
    def test_watch_toggle_issue(self):
        issue = test_data.create_dummy_issue()
        user = issue.createdByUser

        self.assertTrue(not watch_services.is_watching_issue(user, issue.id))

        watch_services.watch_issue(user, issue.id, IssueWatch.WATCHED)
        self.assertTrue(watch_services.is_watching_issue(user, issue.id))

        watch_services.unwatch_issue(user, issue.id)
        self.assertTrue(not watch_services.is_watching_issue(user, issue.id))
def unwatchIssue(request, issue_id):
    watch_services.unwatch_issue(request.user, int(issue_id))
    return HttpResponse('NOT_WATCHING')
Exemple #4
0
def unwatchIssue(request, issue_id):
    watch_services.unwatch_issue(request.user, int(issue_id))
    return HttpResponse('NOT_WATCHING')