def test_debit_card_payment_handles_govuk_errors(self):
self.choose_debit_card_payment_method()
self.fill_in_prisoner_details()
self.fill_in_amount()
with responses.RequestsMock() as rsps:
mock_auth(rsps)
rsps.add(
rsps.POST,
api_url('/payments/'),
json={'uuid': 'wargle-blargle'},
status=201,
)
rsps.add(
rsps.POST,
govuk_url('/payments/'),
status=500
)
with self.patch_prisoner_details_check(), silence_logger():
response = self.client.get(self.url, follow=False)
self.assertContains(response, 'We’re sorry, your payment could not be processed on this occasion')
test_views.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录