summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorWilliam Wolf <throughnothing@gmail.com>2011-07-21 11:10:47 -0400
committerWilliam Wolf <throughnothing@gmail.com>2011-07-21 11:10:47 -0400
commit822b5ecede8f18120ae37eb07ff046101f50d3aa (patch)
treec8a711315f77b77535ac4217f30235b944db2044 /nova/tests
parent148b4095a5f18f192ae243b02b4070af384c1152 (diff)
cleanup tests and fix pep8 issues
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/test_versions.py23
1 files changed, 11 insertions, 12 deletions
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 = """<versions>
<version id="v1.1" status="CURRENT" updated="2011-07-18T11:30:00Z">
- <atom:link href="http://localhost/v1.1" rel="self"/>
+ <atom:link href="http://localhost/v1.1/" rel="self"/>
</version>
- <version id="v1.0" status="DEPRECATED"
- updated="2010-10-09T11:30:00Z">
- <atom:link href="http://localhost/v1.0" rel="self"/>
+ <version id="v1.0" status="DEPRECATED"
+ updated="2010-10-09T11:30:00Z">
+ <atom:link href="http://localhost/v1.0/" rel="self"/>
</version>
</versions>""".replace(" ", "").replace("\n", "")
@@ -120,9 +120,9 @@ class VersionsTest(test.TestCase):
</content>
</entry>
</feed>
- """.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)