def METHOD_NAME(self):
    """Delete thread action - thread belongs to forum."""
    f = ForumFactory()
    t = ThreadFactory()  # Thread belongs to a different forum
    u = UserFactory()
    # Give the user the permission to delete threads.
    g = GroupFactory()
    g.user_set.add(u)
    assign_perm("forums.delete_forum_thread", g, f)
    assign_perm("forums.delete_forum_thread", g, t.forum)
    self.client.login(username=u.username, password="testpass")
    r = get(self.client, "forums.delete_thread", args=[f.slug, t.id])
    self.assertEqual(404, r.status_code)