def test_watch_thread(self):
        t = ThreadFactory()
        u = UserFactory()

        self.client.login(username=u.username, password='testpass')

        response = post(self.client, 'forums.watch_thread', {'watch': 'yes'},
                        args=[t.forum.slug, t.id])
        self.assertContains(response, 'Stop watching this thread')

        response = post(self.client, 'forums.watch_thread', {'watch': 'no'},
                        args=[t.forum.slug, t.id])
        self.assertNotContains(response, 'Stop watching this thread')
Watch and unwatch a thread.
dataset/ETHPy150Open mozilla/kitsune/kitsune/forums/tests/test_templates.py/PostsTemplateTests.test_watch_thread