Commit cdceb9ae authored by Anastasiia Leshkevych's avatar Anastasiia Leshkevych
Browse files

fix(BSE/BSD/ALE): fix error caused by bankAccounts: [None]

parent 05941401
......@@ -611,7 +611,9 @@ schemas:
type: array
minItems: 1
items:
$ref: '#/components/schemas/alienation.BankAccountsByType'
is_required: true
allOf:
- $ref: '#/components/schemas/alienation.BankAccountsByType'
x-legalNameUa: Банківські рахунки організатора
x-legalNameEn: Bank accounts
x_documentRequirements:
......
......@@ -607,7 +607,9 @@ schemas:
type: array
minItems: 1
items:
$ref: '#/components/schemas/basicSell.BankAccountsByType'
is_required: true
allOf:
- $ref: '#/components/schemas/basicSell.BankAccountsByType'
x-legalNameUa: Банківські рахунки організатора
x-legalNameEn: Bank accounts
x_documentRequirements:
......@@ -969,7 +971,9 @@ schemas:
type: array
minItems: 1
items:
$ref: '#/components/schemas/basicSell.BankAccountsByType'
is_required: true
allOf:
- $ref: '#/components/schemas/basicSell.BankAccountsByType'
x-legalNameUa: Банківські рахунки організатора
x-legalNameEn: Bank accounts
x_documentRequirements:
......
......@@ -514,6 +514,11 @@ class RectificationTest:
r'accountType."\}$'),
id='2 BankAccountsByType: guarantee, guarantee'
),
pytest.param(
{'bankAccounts': [None]},
pytest.raises(errors.DataError, match=r'^\{"bankAccounts": \{"0": \["This field is required."\]\}\}$'),
id='wrong bankAccounts data type: None'
),
])
def test_bank_account_validation(self, make_procedure, data, expected):
with expected:
......
......@@ -501,6 +501,11 @@ class RectificationTest:
r'accountType."\}$'),
id='2 BankAccountsByType: guarantee, guarantee'
),
pytest.param(
{'bankAccounts': [None]},
pytest.raises(errors.DataError, match=r'^\{"bankAccounts": \{"0": \["This field is required."\]\}\}$'),
id='wrong bankAccounts data type: None'
),
])
def test_bank_account_validation(self, make_procedure, data, expected):
with expected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment