def METHOD_NAME(self):
    # Edit post action - post belongs to thread and thread belongs
    # to forum.
    f = ForumFactory()
    t = ThreadFactory(forum=f)
    # Post belongs to a different forum and thread.
    p = PostFactory()
    u = p.author
    self.client.login(username=u.username, password="testpass")
    # Post isn't in the passed forum:
    r = get(self.client, "forums.edit_post", args=[f.slug, p.thread.id, p.id])
    self.assertEqual(404, r.status_code)
    # Post isn't in the passed thread:
    r = get(self.client, "forums.edit_post", args=[p.thread.forum.slug, t.id, p.id])
    self.assertEqual(404, r.status_code)