'Editing post as a moderator works.'

def test_edit_post_moderator(self):

    p = PostFactory()
    t = p.thread
    f = t.forum
    moderator_group = GroupFactory()
    ct = ContentType.objects.get_for_model(f)
    PermissionFactory(codename='forums_forum.post_edit_forum', content_type=ct, object_id=f.id, group=moderator_group)
    moderator = UserFactory()
    moderator_group.user_set.add(moderator)
    self.client.login(username=moderator.username, password='testpass')
    r = post(self.client, 'forums.edit_post', {'content': 'More    new    content'}, args=[f.slug, t.id, p.id])
    eq_(200, r.status_code)
    edited_p = Post.objects.get(pk=p.pk)
    eq_('More    new    content', edited_p.content)
