Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
c2f6a275
Commit
c2f6a275
authored
Nov 28, 2012
by
Stavros Sachtouris
Browse files
Unittest reregister
parent
8ae6cb52
Changes
2
Hide whitespace changes
Inline
Side-by-side
kamaki/clients/image.py
View file @
c2f6a275
...
...
@@ -111,6 +111,7 @@ class ImageClient(Client):
for
k
,
v
in
properties
.
items
():
img_properties
[
k
]
=
v
self
.
register
(
img_name
,
location
,
params
,
img_properties
)
r
.
release
()
def
list_members
(
self
,
image_id
):
path
=
path4url
(
'images'
,
image_id
,
'members'
)
...
...
kamaki/clients/tests.py
View file @
c2f6a275
...
...
@@ -38,7 +38,11 @@ import datetime
import
os
import
sys
from
progress.bar
import
IncrementalBar
try
:
from
progress.bar
import
FillingCirclesBar
as
IncrementalBar
except
ImportError
:
print
(
'No progress bars in testing!'
)
pass
from
kamaki.clients
import
ClientError
from
kamaki.clients.pithos
import
PithosClient
as
pithos
...
...
@@ -49,7 +53,7 @@ from kamaki.cli.config import Config
TEST_ALL
=
False
cnf
=
Config
(
'/home/saxtouri/.kamakirc'
)
cnf
=
Config
()
global_username
=
cnf
.
get
(
'global'
,
'account'
)
token
=
cnf
.
get
(
'global'
,
'token'
)
...
...
@@ -215,6 +219,12 @@ class testImage(unittest.TestCase):
for
img
in
self
.
_imglist
.
values
():
self
.
assertTrue
(
img
!=
None
)
def
test_reregister
(
self
):
"""Test reregister"""
self
.
_prepare_img
()
self
.
client
.
reregister
(
self
.
imglocation
,
properties
=
dict
(
my_property
=
'some_value'
))
def
test_set_members
(
self
):
"""Test set_members"""
self
.
_prepare_img
()
...
...
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