test_admin.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:fluentcms-publishing 作者: bashu 项目源码 文件源码
def setUp(self):
        self.user = G(User)
        self.admin = G(
            User,
            is_staff=True,
            is_active=True,
            is_superuser=True,
        )
        self.layout = G(
            PageLayout,
            template_path='default.html',
        )
        self.page = Page.objects.create(
            author=self.admin,
            title='Hello, world!',
            slug='hello-world',
            layout=self.layout,
        )
        self.content_instance = create_content_instance(
            RawHtmlItem,
            self.page,
            placeholder_name='content',
            html='<b>lorem ipsum dolor sit amet...</b>'
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号