'Editing post as a moderator works.'

def test_edit_thread_moderator(self):

    t = ThreadFactory()
    f = t.forum
    u = UserFactory()
    g = GroupFactory()
    ct = ContentType.objects.get_for_model(f)
    PermissionFactory(codename='forums_forum.thread_edit_forum', content_type=ct, object_id=f.id, group=g)
    g.user_set.add(u)
    self.client.login(username=u.username, password='testpass')
    r = post(self.client, 'forums.edit_thread', {'title': 'new    title'}, args=[f.slug, t.id])
    eq_(200, r.status_code)
    edited_t = Thread.objects.get(id=t.id)
    eq_('new    title', edited_t.title)
