'Assert Forums are inaccessible to the public when restricted.'

def test_access_restriction(self):

    f = ForumFactory()
    ct = ContentType.objects.get_for_model(f)
    PermissionFactory(codename='forums_forum.view_in_forum', content_type=ct, object_id=f.id)
    PermissionFactory(codename='forums_forum.post_in_forum', content_type=ct, object_id=f.id)
    unprivileged_user = UserFactory()
    assert (not f.allows_viewing_by(unprivileged_user))
    assert (not f.allows_posting_by(unprivileged_user))
