def test_shows_flash_messages(self):
self.set_form_session_data(counties=['alameda'])
flash_messages = [
"A flying horse is called a pegasus",
"A horse with a horn is called a unicorn"]
self.send_confirmations.return_value = flash_messages
self.client.fill_form(
reverse('intake-county_application'),
follow=True,
**mock.fake.ebclc_answers())
response = self.client.fill_form(
reverse('intake-review'),
follow=True,
submit_action='approve_application'
)
for message in flash_messages:
self.assertContains(
response, escape(message))
test_application_done_view.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录