Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Setra Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
it-bott-integrasjoner
Setra Client
Commits
8a129e1e
Commit
8a129e1e
authored
4 years ago
by
Petr Kalashnikov
Browse files
Options
Downloads
Patches
Plain Diff
Fix input for batch_complete
parent
fa3efdd0
No related branches found
No related tags found
1 merge request
!7
OM46, del 1: Support batch_complete endpoint from setra
Pipeline
#57136
passed
4 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
setra_client/client.py
+3
-6
3 additions, 6 deletions
setra_client/client.py
tests/test_client.py
+1
-1
1 addition, 1 deletion
tests/test_client.py
with
4 additions
and
7 deletions
setra_client/client.py
+
3
−
6
View file @
8a129e1e
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
tests/test_client.py
+
1
−
1
View file @
8a129e1e
...
...
@@ -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
'
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment