def test_move_thread(self):
        t = ThreadFactory()
        f = ForumFactory()
        u = UserFactory()
        g = GroupFactory()

        # Give the user permission to move threads between the two forums.
        ct = ContentType.objects.get_for_model(f)
        PermissionFactory(codename='forums_forum.thread_move_forum', content_type=ct,
                          object_id=f.id, group=g)
        PermissionFactory(codename='forums_forum.thread_move_forum', content_type=ct,
                          object_id=t.forum.id, group=g)
        g.user_set.add(u)

        self.client.login(username=u.username, password='testpass')
        response = post(self.client, 'forums.move_thread',
                        {'forum': f.id},
                        args=[t.forum.slug, t.id])
        eq_(200, response.status_code)
        t = Thread.objects.get(pk=t.pk)
        eq_(f.id, t.forum.id)
Move a thread.
dataset/ETHPy150Open mozilla/kitsune/kitsune/forums/tests/test_views.py/ThreadPermissionsTests.test_move_thread