def test_restricted_hide_new_thread(self):
        f = ForumFactory()
        ct = ContentType.objects.get_for_model(f)
        # If the forum has the permission and the user isn't assigned said
        # permission, then they can't post.
        PermissionFactory(codename='forums_forum.post_in_forum', content_type=ct, object_id=f.id)
        u = UserFactory()

        self.client.login(username=u.username, password='testpass')
        response = get(self.client, 'forums.threads', args=[f.slug])
        self.assertNotContains(response, 'Post a new thread')
'Post new thread' doesn't show if user has no permission to post.
dataset/ETHPy150Open mozilla/kitsune/kitsune/forums/tests/test_templates.py/ThreadsTemplateTests.test_restricted_hide_new_thread