Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
d29034b7
Commit
d29034b7
authored
Oct 21, 2022
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_slapconfiguration: improve request Handler
parent
a38a91b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/test/recipe/test_slaposconfiguration.py
slapos/test/recipe/test_slaposconfiguration.py
+3
-3
No files found.
slapos/test/recipe/test_slaposconfiguration.py
View file @
d29034b7
...
...
@@ -10,6 +10,7 @@ from slapos.recipe import slapconfiguration
from
slapos
import
format
as
slapformat
from
slapos.grid.SlapObject
import
SOFTWARE_INSTANCE_JSON_FILENAME
from
slapos.util
import
dumps
,
calculate_dict_hash
from
slapos.slap.slap
import
json_loads_byteified
class
APIRequestHandler
(
object
):
...
...
@@ -26,10 +27,9 @@ class APIRequestHandler(object):
self
.
sequence_list
.
append
(
url
.
path
)
if
not
self
.
response_list
and
self
.
response_list
[
0
][
0
]
!=
url
.
path
:
if
not
self
.
response_list
or
self
.
response_list
[
0
][
0
]
!=
url
.
path
:
raise
ValueError
(
"Unexcpected call: %s %s"
%
(
url
.
path
,
req
.
body
))
self
.
request_payload_list
.
append
(
req
.
body
)
self
.
request_payload_list
.
append
(
json_loads_byteified
(
req
.
body
))
return
self
.
response_list
.
pop
(
0
)[
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment