0001-misc-transform-Payment.payment_status-into-a-propert.patch
eopayment/__init__.py | ||
---|---|---|
234 | 234 |
def has_free_transaction_id(self): |
235 | 235 |
return self.backend.has_free_transaction_id |
236 | 236 | |
237 |
def payment_status(self, transaction_id, **kwargs): |
|
238 |
if not self.backend.payment_status: |
|
239 |
raise NotImplementedError('payment_status is not implemented on this backend') |
|
240 |
return self.backend.payment_status(transaction_id=transaction_id, **kwargs) |
|
237 |
@property |
|
238 |
def payment_status(self): |
|
239 |
return self.backend.payment_status |
tests/test_base_payment.py | ||
---|---|---|
112 | 112 | |
113 | 113 |
def test_payment_status(monkeypatch): |
114 | 114 |
_, payment = do_mock_backend(monkeypatch) |
115 | ||
116 |
with pytest.raises(NotImplementedError): |
|
117 |
payment.payment_status('whatever') |
|
115 |
assert not payment.payment_status |
|
118 |
- |