Skip to content
Snippets Groups Projects
Commit 8a129e1e authored by Petr Kalashnikov's avatar Petr Kalashnikov
Browse files

Fix input for batch_complete

parent fa3efdd0
No related branches found
No related tags found
1 merge request!7OM46, del 1: Support batch_complete endpoint from setra
Pipeline #57136 passed
......@@ -221,15 +221,12 @@ class SetraClient(object):
return_response=return_response)
return response
def get_batch_complete(self, batch_id: int = None):
def get_batch_complete(self, batch_id: str):
"""
GETs one or all batches from SETRA
GETs complete batch (with vouchers and transactions)
from SETRA
"""
if batch_id is not None:
batch_id = str(batch_id)
url = self.urls.batch_complete(batch_id)
response = self.get(url)
return response.json()
......
......@@ -307,6 +307,6 @@ def test_successfully_getting_batch_complete(client, requests_mock, baseurl):
url = SetraEndpoints(baseurl).batch_complete(batch_id='1')
requests_mock.get(url, json={'foo': 'bar'}, status_code=200)
response = client.get_batch_complete(1)
response = client.get_batch_complete('1')
assert response == {'foo': 'bar'}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment