test_application_transfer_view.py 文件源码

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

项目:intake 作者: codeforamerica 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号