def test_authorize_operation(tp_provider):
    payment = Payment()
    authorization = Authorization(status_code=(- 1), status_message='Solicitud de Autorizacion Registrada', form_url='https://forms.todopago.com.ar/formulario/commands?command=formulario&amp;m=a6104bad3-1be7-4e8e-932e-e927100b2e86&amp;fr=1', request_key='f5ad41bc-92ba-40ff-889d-8a23fe562a28', public_request_key='a6104bad3-1be7-4e8e-932e-e927100b2e86')
    with patch('python_todopago.TodoPagoConnector.authorize_operation', spec=True, return_value=authorization):
        tp_provider.authorize_operation(payment)
    assert (payment.status == PaymentStatus.WAITING)
    assert (payment.attrs.request_key == 'f5ad41bc-92ba-40ff-889d-8a23fe562a28')
def test_authorize_operation(tp_provider):
    payment = Payment()
    authorization = Authorization(status_code=(- 1), status_message='Solicitud de Autorizacion Registrada', form_url='https://forms.todopago.com.ar/formulario/commands?command=formulario&amp;m=a6104bad3-1be7-4e8e-932e-e927100b2e86&amp;fr=1', request_key='f5ad41bc-92ba-40ff-889d-8a23fe562a28', public_request_key='a6104bad3-1be7-4e8e-932e-e927100b2e86')
    with patch('python_todopago.TodoPagoConnector.authorize_operation', spec=True, return_value=authorization):
        tp_provider.authorize_operation(payment)
    assert (payment.status == PaymentStatus.WAITING)
    assert (payment.attrs.request_key == 'f5ad41bc-92ba-40ff-889d-8a23fe562a28')