本文整理汇总了Python中wagtail.tests.utils.login函数的典型用法代码示例。如果您正苦于以下问题:Python login函数的具体用法?Python login怎么用?Python login使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了login函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
self.test_snippet = Advert()
self.test_snippet.text = 'test_advert'
self.test_snippet.url = 'http://www.example.com/'
self.test_snippet.save()
login(self.client)
开发者ID:Halfnhav4,项目名称:wagtail,代码行数:7,代码来源:tests.py
示例2: setUp
def setUp(self):
# Create a redirect to edit
self.redirect = models.Redirect(old_path='/test', redirect_link='http://www.test.com/')
self.redirect.save()
# Login
login(self.client)
开发者ID:dvska,项目名称:wagtail,代码行数:7,代码来源:tests.py
示例3: setUp
def setUp(self):
login(self.client)
# Create an image to edit
self.image = Image.objects.create(
title="Test image",
file=get_test_image_file(),
)
开发者ID:jim-altcom,项目名称:wagtail,代码行数:8,代码来源:tests.py
示例4: setUp
def setUp(self):
self.root_page = Page.objects.get(id=2)
# Add child page
self.child_page = SimplePage()
self.child_page.title = "foobarbaz"
self.child_page.slug = "foobarbaz"
self.root_page.add_child(instance=self.child_page)
login(self.client)
开发者ID:tpphu,项目名称:wagtail,代码行数:10,代码来源:test_page_chooser.py
示例5: setUp
def setUp(self):
# Find root page
self.root_page = Page.objects.get(id=2)
# Add child page
self.child_page = SimplePage()
self.child_page.title = "Hello world!"
self.child_page.slug = "hello-world"
self.child_page.live = True
self.root_page.add_child(self.child_page)
self.child_page.save_revision()
# Add event page (to test edit handlers)
self.event_page = EventPage()
self.event_page.title = "Event page"
self.event_page.slug = "event-page"
self.root_page.add_child(self.event_page)
# Login
login(self.client)
开发者ID:ErnieMac,项目名称:wagtail,代码行数:20,代码来源:tests.py
示例6: setUp
def setUp(self):
self.homepage = Page.objects.get(id=2)
login(self.client)
开发者ID:Halfnhav4,项目名称:wagtail,代码行数:3,代码来源:tests.py
示例7: setUp
def setUp(self):
login(self.client)
# Create an editors pick to delete
self.query = models.Query.get("Hello")
self.query.editors_picks.create(page_id=1, description="Root page")
开发者ID:jim-altcom,项目名称:wagtail,代码行数:6,代码来源:test_editorspicks.py
注:本文中的wagtail.tests.utils.login函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论