misc: add get_min_time_between_transactions() accessor (#49144)

This commit is contained in:
Benjamin Dauvergne 2021-03-11 12:58:57 +01:00
parent a9516b5c64
commit 3b5dbb6537
2 changed files with 10 additions and 0 deletions

View File

@ -230,6 +230,11 @@ class Payment(object):
res.append(param)
return res
def get_min_time_between_transactions(self):
if hasattr(self.backend, 'min_time_between_transactions'):
return self.backend.min_time_between_transactions
return 0
@property
def has_free_transaction_id(self):
return self.backend.has_free_transaction_id

View File

@ -113,3 +113,8 @@ def test_get_parameters(monkeypatch):
def test_payment_status(monkeypatch):
_, payment = do_mock_backend(monkeypatch)
assert not payment.has_payment_status
def test_get_min_time_between_transaction(monkeypatch):
_, payment = do_mock_backend(monkeypatch)
assert payment.get_min_time_between_transactions() == 0