Projet

Général

Profil

0001-misc-add-get_min_time_between_transactions-accessor-.patch

Benjamin Dauvergne, 11 mars 2021 13:02

Télécharger (1,42 ko)

Voir les différences:

Subject: [PATCH 1/2] misc: add get_min_time_between_transactions() accessor
 (#49144)

 eopayment/__init__.py      | 5 +++++
 tests/test_base_payment.py | 5 +++++
 2 files changed, 10 insertions(+)
eopayment/__init__.py
230 230
            res.append(param)
231 231
        return res
232 232

  
233
    def get_min_time_between_transactions(self):
234
        if hasattr(self.backend, 'min_time_between_transactions'):
235
            return self.backend.min_time_between_transactions
236
        return 0
237

  
233 238
    @property
234 239
    def has_free_transaction_id(self):
235 240
        return self.backend.has_free_transaction_id
tests/test_base_payment.py
113 113
def test_payment_status(monkeypatch):
114 114
    _, payment = do_mock_backend(monkeypatch)
115 115
    assert not payment.has_payment_status
116

  
117

  
118
def test_get_min_time_between_transaction(monkeypatch):
119
    _, payment = do_mock_backend(monkeypatch)
120
    assert payment.get_min_time_between_transactions() == 0
116
-