Commit c2f6a275 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Unittest reregister

parent 8ae6cb52
......@@ -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')
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment