From 822b5ecede8f18120ae37eb07ff046101f50d3aa Mon Sep 17 00:00:00 2001 From: William Wolf Date: Thu, 21 Jul 2011 11:10:47 -0400 Subject: cleanup tests and fix pep8 issues --- nova/tests/api/openstack/test_versions.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/api/openstack/test_versions.py b/nova/tests/api/openstack/test_versions.py index 471afec94..6139731b9 100644 --- a/nova/tests/api/openstack/test_versions.py +++ b/nova/tests/api/openstack/test_versions.py @@ -47,7 +47,7 @@ class VersionsTest(test.TestCase): "links": [ { "rel": "self", - "href": "http://localhost/v1.1", + "href": "http://localhost/v1.1/", }], }, { @@ -57,7 +57,7 @@ class VersionsTest(test.TestCase): "links": [ { "rel": "self", - "href": "http://localhost/v1.0", + "href": "http://localhost/v1.0/", }], }, ] @@ -72,11 +72,11 @@ class VersionsTest(test.TestCase): expected = """ - + - - + + """.replace(" ", "").replace("\n", "") @@ -120,9 +120,9 @@ class VersionsTest(test.TestCase): - """.replace(" ", "").replace("\n", "").replace("\t", "") + """.replace(" ", "").replace("\n", "") - actual = res.body.replace(" ", "").replace("\n", "").replace("\t","") + actual = res.body.replace(" ", "").replace("\n", "") self.assertEqual(expected, actual) @@ -132,8 +132,7 @@ class VersionsTest(test.TestCase): version_data = { "id": "3.2.1", "status": "CURRENT", - "updated": "2011-07-18T11:30:00Z" - } + "updated": "2011-07-18T11:30:00Z"} expected = { "id": "3.2.1", @@ -142,7 +141,7 @@ class VersionsTest(test.TestCase): "links": [ { "rel": "self", - "href": "http://example.org/3.2.1", + "href": "http://example.org/3.2.1/", }, ], } @@ -156,7 +155,7 @@ class VersionsTest(test.TestCase): base_url = "http://example.org/app/" version_number = "v1.4.6" - expected = "http://example.org/app/v1.4.6" + expected = "http://example.org/app/v1.4.6/" builder = views.versions.ViewBuilder(base_url) actual = builder.generate_href(version_number) -- cgit