def test_sees_expected_message(self):
user = self.be_apubdef_user()
response = self.client.get(self.url)
expected_intro, expected_body = \
TransferService.render_application_transfer_message(
form_submission=self.sub,
author=user,
to_organization=self.to_org,
from_organization=self.from_org)
self.assertContains(response, escape(expected_intro))
self.assertContains(response, escape(expected_body))
self.assertIn(self.to_org.name, expected_body)
self.assertIn(self.from_org.name, expected_intro)
self.assertIn(user.profile.name, expected_intro)
self.assertContains(response, 'following message will be')
self.assertContains(response, 'to the applicant')
test_application_transfer_view.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录