summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-10-12 22:40:43 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-10-26 19:41:43 (GMT)
commited22f7e18229648391f09bb46c3129ebbd751979 (patch)
tree9f1fc96b877773e1f43d0da68d5051f634958f9b
parentc4f59e44124bdff60339dd3240214fef3a7bd76e (diff)
downloadeopayment-ed22f7e18229648391f09bb46c3129ebbd751979.zip
eopayment-ed22f7e18229648391f09bb46c3129ebbd751979.tar.gz
eopayment-ed22f7e18229648391f09bb46c3129ebbd751979.tar.bz2
dummy: remove unused siret parameter (#34064)
-rw-r--r--eopayment/dummy.py12
-rw-r--r--tests/test_dummy.py5
2 files changed, 3 insertions, 14 deletions
diff --git a/eopayment/dummy.py b/eopayment/dummy.py
index 7e207bb..8f491f5 100644
--- a/eopayment/dummy.py
+++ b/eopayment/dummy.py
@@ -89,15 +89,6 @@ class Payment(PaymentCommon):
'default': 'origin',
},
{
- 'name': 'siret',
- 'caption': 'dummy siret parameter',
- 'validation': lambda x: x.isdigit(),
- 'validation_err_msg': 'must be a number',
- 'type': str,
- 'default': '1234',
- 'required': True,
- },
- {
'name': 'consider_all_response_signed',
'caption': (
'All response will be considered as signed '
@@ -149,7 +140,7 @@ class Payment(PaymentCommon):
'%s amount %s name %s address %s email %s phone %s'
' next_url %s info1 %s info2 %s info3 %s kwargs: %s',
__name__, amount, name, address, email, phone, info1, info2, info3, next_url, kwargs)
- transaction_id = self.transaction_id(30, ALPHANUM, 'dummy', self.siret)
+ transaction_id = self.transaction_id(30, ALPHANUM, 'dummy')
normal_return_url = self.normal_return_url
if next_url and not normal_return_url:
warnings.warn("passing next_url to request() is deprecated, "
@@ -162,7 +153,6 @@ class Payment(PaymentCommon):
automatic_return_url = self.direct_notification_url
query = {
'transaction_id': transaction_id,
- 'siret': self.siret,
'amount': amount,
'email': email,
'return_url': normal_return_url or '',
diff --git a/tests/test_dummy.py b/tests/test_dummy.py
index f0291d0..ec901ae 100644
--- a/tests/test_dummy.py
+++ b/tests/test_dummy.py
@@ -25,7 +25,6 @@ import pytest
def backend():
options = {
'automatic_notification_url': 'http://example.com/direct_notification_url',
- 'siret': '1234',
'origin': 'Mairie de Perpette-les-oies'
}
return eopayment.Payment('dummy', options)
@@ -33,7 +32,8 @@ def backend():
def test_request(backend, freezer):
freezer.move_to('2020-01-01 00:00:00+01:00')
- transaction_id, method, raw_url = backend.request('10.10', capture_date=datetime.date(2020, 1, 7), subject='Repas pour 4 personnes')
+ transaction_id, method, raw_url = backend.request(
+ '10.10', capture_date=datetime.date(2020, 1, 7), subject='Repas pour 4 personnes')
assert transaction_id
assert method == 1
url = urlparse(raw_url)
@@ -43,7 +43,6 @@ def test_request(backend, freezer):
assert url.fragment == ''
qs = {k: v[0] for k, v in parse_qs(url.query).items()}
assert qs['transaction_id'] == transaction_id
- assert qs['siret'] == '1234'
assert qs['amount'] == '10.10'
assert qs['origin'] == 'Mairie de Perpette-les-oies'
assert qs['capture_day'] == '6'