summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-01-25 21:46:12 +0000
committerRick Harris <rick.harris@rackspace.com>2011-01-25 21:46:12 +0000
commit9fac0cefb1ba4d7ffa85315a3843ef70ce37691c (patch)
tree2c9fb564896647b3c25627a4b27682bd7530fb53 /nova/tests
parenta9ab2d0f0618f855686cb8713b28c3737faabdcc (diff)
parent705cbaa3d311c21cf2a7318e52a60eeadebb435a (diff)
Merge trunk
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_cloud.py10
-rw-r--r--nova/tests/test_rpc.py3
-rw-r--r--nova/tests/test_virt.py2
3 files changed, 13 insertions, 2 deletions
diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py
index 771b1fcc0..445cc6e8b 100644
--- a/nova/tests/test_cloud.py
+++ b/nova/tests/test_cloud.py
@@ -87,6 +87,16 @@ class CloudTestCase(test.TestCase):
# NOTE(vish): create depends on pool, so just call helper directly
return cloud._gen_key(self.context, self.context.user.id, name)
+ def test_describe_regions(self):
+ """Makes sure describe regions runs without raising an exception"""
+ result = self.cloud.describe_regions(self.context)
+ self.assertEqual(len(result['regionInfo']), 1)
+ regions = FLAGS.region_list
+ FLAGS.region_list = ["one=test_host1", "two=test_host2"]
+ result = self.cloud.describe_regions(self.context)
+ self.assertEqual(len(result['regionInfo']), 2)
+ FLAGS.region_list = regions
+
def test_describe_addresses(self):
"""Makes sure describe addresses runs without raising an exception"""
address = "10.10.10.10"
diff --git a/nova/tests/test_rpc.py b/nova/tests/test_rpc.py
index 85593ab46..4820e04fb 100644
--- a/nova/tests/test_rpc.py
+++ b/nova/tests/test_rpc.py
@@ -86,7 +86,8 @@ class RpcTestCase(test.TestCase):
@staticmethod
def echo(context, queue, value):
"""Calls echo in the passed queue"""
- LOG.debug(_("Nested received %s, %s"), queue, value)
+ LOG.debug(_("Nested received %(queue)s, %(value)s")
+ % locals())
ret = rpc.call(context,
queue,
{"method": "echo",
diff --git a/nova/tests/test_virt.py b/nova/tests/test_virt.py
index f6800e3d9..0b9b847a0 100644
--- a/nova/tests/test_virt.py
+++ b/nova/tests/test_virt.py
@@ -256,7 +256,7 @@ class IptablesFirewallTestCase(test.TestCase):
':FORWARD ACCEPT [0:0]',
':OUTPUT ACCEPT [349256:75777230]',
'COMMIT',
- '# Completed on Tue Jan 18 23:47:56 2011'
+ '# Completed on Tue Jan 18 23:47:56 2011',
]
def test_static_filters(self):