def METHOD_NAME(self):
    last_year = timezone.now() - timedelta(days=365)
    transaction = TransactionFactory.create(state=Transaction.States.Initial,
                                            valid_until=last_year)
    response = self.client.get(get_payment_url(transaction, None))
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(force_str(response.content),
                     render_to_string('transactions/expired_payment.html', {
                         'document': transaction.document,
                     }))