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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
810f0e94
Commit
810f0e94
authored
May 10, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that data are correctly stored.
parent
39f40076
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
..._api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
+12
-3
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 @
810f0e94
...
...
@@ -8,7 +8,6 @@ import urlparse
import
json
import
tempfile
import
os
import
xml_marshaller
class
Simulator
:
def
__init__
(
self
,
outfile
):
...
...
@@ -137,8 +136,6 @@ class VifibSlaposRestAPIV1Mixin(TestVifibSlapWebServiceMixin):
(
'slave'
,
'shared'
),
(
'status'
,
'state'
)
):
if
k_j
in
(
'sla'
,
'parameter'
):
reckwargs
[
k_i
]
=
xml_marshaller
.
xml_marshaller
.
loads
(
reckwargs
.
pop
(
k_i
))
kwargs
[
k_i
]
=
kwargs
.
pop
(
k_j
)
self
.
assertEqual
(
args
,
recargs
)
self
.
assertEqual
(
kwargs
,
reckwargs
)
...
...
@@ -279,6 +276,12 @@ class TestInstanceRequest(VifibSlaposRestAPIV1Mixin):
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
202
)
self
.
assertResponseJson
()
kwargs
[
'parameter'
]
=
'<?xml version=
\
'
1.0
\
'
encoding=
\
'
utf-8
\
'
?>
\
n
<i'
\
'nstance>
\
n
<parameter id="Custom1">one string</parameter>
\
n
<paramet'
\
'er id="Custom2">one float</parameter>
\
n
<parameter id="Custom3">[u
\
'
a'
\
'bc
\
'
, u
\
'
def
\
'
]</parameter>
\
n
</instance>
\
n
'
kwargs
[
'sla'
]
=
'<?xml version=
\
'
1.0
\
'
encoding=
\
'
utf-8
\
'
?>
\
n
<instanc'
\
'e>
\
n
<parameter id="computer_id">COMP-0</parameter>
\
n
</instance>
\
n
'
self
.
assertPersonRequestSimulator
((),
kwargs
)
self
.
assertEqual
({
"status"
:
"processing"
,
...
...
@@ -308,6 +311,12 @@ class TestInstanceRequest(VifibSlaposRestAPIV1Mixin):
self
.
assertBasicResponse
()
self
.
assertResponseCode
(
202
)
self
.
assertResponseJson
()
kw_request
[
'parameter'
]
=
'<?xml version=
\
'
1.0
\
'
encoding=
\
'
utf-8
\
'
?>
\
n
<i'
\
'nstance>
\
n
<parameter id="Custom1">one string</parameter>
\
n
<paramet'
\
'er id="Custom2">one float</parameter>
\
n
<parameter id="Custom3">[u
\
'
a'
\
'bc
\
'
, u
\
'
def
\
'
]</parameter>
\
n
</instance>
\
n
'
kw_request
[
'sla'
]
=
'<?xml version=
\
'
1.0
\
'
encoding=
\
'
utf-8
\
'
?>
\
n
<instanc'
\
'e>
\
n
<parameter id="computer_id">COMP-0</parameter>
\
n
</instance>
\
n
'
self
.
assertPersonRequestSimulator
((),
kw_request
)
self
.
assertEqual
({
"status"
:
"processing"
,
...
...
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
View file @
810f0e94
35
\ No newline at end of file
36
\ 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