CLOUDSTACK-3672: Multiple minor fixes to tags tests

- SourceHost is an id
- Invalid format in debug() message corrected

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit ce4dd723ab486894523f08f48b6054f614be4d85)
This commit is contained in:
Prasanna Santhanam 2013-07-22 14:50:45 +05:30
parent 5fa77f3099
commit 323db5c517

View File

@ -1083,12 +1083,12 @@ class TestResourceTags(cloudstackTestCase):
'CentOS', 'CentOS',
'The tag should have original value' 'The tag should have original value'
) )
isos = Iso.list( isos = Iso.list(
self.apiclient, self.apiclient,
listall=True,
key='OS', key='OS',
value='CentOS' value='CentOS',
account=self.account.name,
domainid=self.account.domainid
) )
self.assertEqual( self.assertEqual(
@ -1096,7 +1096,7 @@ class TestResourceTags(cloudstackTestCase):
True, True,
"List isos should not return an empty response" "List isos should not return an empty response"
) )
self.debug("Deleting the created tag..") self.debug("Deleting the created tag..")
try: try:
tag.delete( tag.delete(
@ -1454,14 +1454,14 @@ class TestResourceTags(cloudstackTestCase):
self.debug("Available hosts: ") self.debug("Available hosts: ")
for host in hosts: for host in hosts:
self.debug("Host: %s", host.id) self.debug("Host: %s" % host.id)
# Filtering out the source host from list host response # Filtering out the source host from list host response
temp_hosts = [host for host in hosts if host.id != source_host] temp_hosts = [host for host in hosts if host.id != source_host]
dest_host = temp_hosts[0] dest_host = temp_hosts[0]
self.debug("Destination host is: %s" % dest_host.id) self.debug("Destination host is: %s" % dest_host.id)
self.debug("Source host is: %s" % source_host.id) self.debug("Source host is: %s" % source_host)
self.debug("Creating a tag for user VM") self.debug("Creating a tag for user VM")
tag = Tag.create( tag = Tag.create(