def test_clean_authorize(): payment = Mock(can_authorize=Mock(return_value=True)) clean_authorize(payment) payment = Mock(can_authorize=Mock(return_value=False)) with pytest.raises(PaymentError): clean_authorize(payment)
def test_clean_authorize(): payment = Mock(can_authorize=Mock(return_value=True)) clean_authorize(payment) payment = Mock(can_authorize=Mock(return_value=False)) with pytest.raises(PaymentError): clean_authorize(payment)