From 68c9c8930038fe3af3092f3de75591146d57c9e4 Mon Sep 17 00:00:00 2001 From: Ed Leafe Date: Tue, 18 Jan 2011 21:00:28 -0500 Subject: Completed first pass at converting all localized strings with multiple format substitutions. --- nova/tests/test_rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/test_rpc.py b/nova/tests/test_rpc.py index 85593ab46..9b0b7b145 100644 --- a/nova/tests/test_rpc.py +++ b/nova/tests/test_rpc.py @@ -86,7 +86,7 @@ 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", -- cgit From d131bcece0f14ae9124f386b814f8354f8da8ecd Mon Sep 17 00:00:00 2001 From: Ed Leafe Date: Wed, 19 Jan 2011 15:26:09 -0500 Subject: Updated trunk changes to work with localization --- nova/tests/test_rpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/test_rpc.py b/nova/tests/test_rpc.py index 9b0b7b145..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 %(queue)s, %(value)s") % locals()) + LOG.debug(_("Nested received %(queue)s, %(value)s") + % locals()) ret = rpc.call(context, queue, {"method": "echo", -- cgit From 354c16138abed0e4c43a4b0e0e21dfe7d2106a7a Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Sat, 22 Jan 2011 15:14:33 -0800 Subject: add test and fix describe regions --- nova/tests/test_cloud.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index 771b1fcc0..4d7639339 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -87,6 +87,17 @@ 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) + print result + self.assertEqual(len(result['regionInfo']), 2) + regions = FLAGS.region_list + def test_describe_addresses(self): """Makes sure describe addresses runs without raising an exception""" address = "10.10.10.10" -- cgit From 1fc00fd38629735352dd887573f3a4fca8946601 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Sat, 22 Jan 2011 15:17:43 -0800 Subject: remove extra print --- nova/tests/test_cloud.py | 1 - 1 file changed, 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index 4d7639339..5e456e615 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -94,7 +94,6 @@ class CloudTestCase(test.TestCase): regions = FLAGS.region_list FLAGS.region_list = ["one=test_host1", "two=test_host2"] result = self.cloud.describe_regions(self.context) - print result self.assertEqual(len(result['regionInfo']), 2) regions = FLAGS.region_list -- cgit From fb4638f1cbe17ce0c2e0eb4580f81f3cb787de0f Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Sat, 22 Jan 2011 17:46:05 -0800 Subject: fix reversed assignment --- nova/tests/test_cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index 5e456e615..445cc6e8b 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -95,7 +95,7 @@ class CloudTestCase(test.TestCase): FLAGS.region_list = ["one=test_host1", "two=test_host2"] result = self.cloud.describe_regions(self.context) self.assertEqual(len(result['regionInfo']), 2) - regions = FLAGS.region_list + FLAGS.region_list = regions def test_describe_addresses(self): """Makes sure describe addresses runs without raising an exception""" -- cgit From 6e7364cb00fd33e82d87aa2006be1b512ae35cc2 Mon Sep 17 00:00:00 2001 From: John Dewey Date: Mon, 24 Jan 2011 18:31:04 -0800 Subject: Updated a couple data structures to pass pep8. --- nova/tests/test_virt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/tests') 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): -- cgit