Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Véron
slapos.core
Commits
a27a5131
Commit
a27a5131
authored
May 09, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proof that additional arguments are ignored.
Thanks to this future compatibility can be easily achieved.
parent
8c55f4cc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
..._api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
+29
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
+1
-1
No files found.
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
View file @
a27a5131
...
@@ -282,6 +282,35 @@ class TestInstanceRequest(VifibSlaposRestAPIV1Mixin):
...
@@ -282,6 +282,35 @@ class TestInstanceRequest(VifibSlaposRestAPIV1Mixin):
},
},
self
.
json_response
)
self
.
json_response
)
def
test_additional_key_json
(
self
):
kw_request
=
{
'parameter'
:
{
'Custom1'
:
'one string'
,
'Custom2'
:
'one float'
,
'Custom3'
:
[
'abc'
,
'def'
]},
'title'
:
'My unique instance'
,
'software_release'
:
'http://example.com/example.cfg'
,
'status'
:
'started'
,
'sla'
:
{
'computer_id'
:
'COMP-0'
},
'software_type'
:
'type_provided_by_the_software'
,
'slave'
:
True
}
kwargs
=
kw_request
.
copy
()
kwargs
.
update
(
**
{
'wrong_key'
:
'Be ignored'
})
self
.
connection
.
request
(
method
=
'POST'
,
url
=
'/'
.
join
([
self
.
api_path
,
'instance'
]),
body
=
json
.
dumps
(
kwargs
),
headers
=
{
'REMOTE_USER'
:
self
.
customer_reference
})
self
.
prepareResponse
()
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
202
)
self
.
assertResponseJson
()
self
.
assertPersonRequestSimulator
((),
kw_request
)
self
.
assertEqual
({
"status"
:
"processing"
,
},
self
.
json_response
)
def
test_correct_server_side_raise
(
self
):
def
test_correct_server_side_raise
(
self
):
self
.
customer
.
requestSoftwareInstance
=
\
self
.
customer
.
requestSoftwareInstance
=
\
RaisingSimulator
(
AttributeError
)
RaisingSimulator
(
AttributeError
)
...
...
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
View file @
a27a5131
27
28
\ No newline at end of file
\ No newline at end of file
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