def get(self, request, *args, **kwargs):
     prisoner_details = self.valid_form_data[BankTransferPrisonerDetailsView.url_name]
     kwargs.update({
         'account_number': settings.NOMS_HOLDING_ACCOUNT_NUMBER,
         'sort_code': settings.NOMS_HOLDING_ACCOUNT_SORT_CODE,
         'bank_transfer_reference': bank_transfer_reference(
             prisoner_details['prisoner_number'],
             prisoner_details['prisoner_dob'],
         )
     })
     response = super().get(request, *args, **kwargs)
     request.session.flush()
     return response
 def test_bank_transfer_reference(self):
     self.assertEqual(
         bank_transfer_reference('AB1234AB', datetime.date(1980, 1, 4)),
         'AB1234AB/04/01/1980',
     )