summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2011-07-07 10:51:16 -0400
committerAlex Meade <alex.meade@rackspace.com>2011-07-07 10:51:16 -0400
commit6eb7228b95d0545fdac30cdc2f01b20a1c932a96 (patch)
tree80d814c04e9eb97b1145186c0657da08154f06aa /nova/tests
parentb50e92d43f958bf966fce4f608daa467b40453c1 (diff)
parentcd903f6c813010c8f09adc0cb63d787108a52b8b (diff)
Merged trunk
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/test_flavors.py40
-rw-r--r--nova/tests/api/openstack/test_images.py66
-rw-r--r--nova/tests/api/openstack/test_servers.py16
3 files changed, 17 insertions, 105 deletions
diff --git a/nova/tests/api/openstack/test_flavors.py b/nova/tests/api/openstack/test_flavors.py
index fba4d593a..689647cc6 100644
--- a/nova/tests/api/openstack/test_flavors.py
+++ b/nova/tests/api/openstack/test_flavors.py
@@ -159,13 +159,7 @@ class FlavorsTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/flavors/12",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/flavors/12",
+ "href": "http://localhost/flavors/12",
},
],
}
@@ -188,13 +182,7 @@ class FlavorsTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/flavors/1",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/flavors/1",
+ "href": "http://localhost/flavors/1",
},
],
},
@@ -208,13 +196,7 @@ class FlavorsTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/flavors/2",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/flavors/2",
+ "href": "http://localhost/flavors/2",
},
],
},
@@ -240,13 +222,7 @@ class FlavorsTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/flavors/1",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/flavors/1",
+ "href": "http://localhost/flavors/1",
},
],
},
@@ -262,13 +238,7 @@ class FlavorsTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/flavors/2",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/flavors/2",
+ "href": "http://localhost/flavors/2",
},
],
},
diff --git a/nova/tests/api/openstack/test_images.py b/nova/tests/api/openstack/test_images.py
index 25c7001f5..701d8be8a 100644
--- a/nova/tests/api/openstack/test_images.py
+++ b/nova/tests/api/openstack/test_images.py
@@ -400,6 +400,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
actual_image = json.loads(response.body)
href = "http://localhost/v1.1/images/124"
+ bookmark = "http://localhost/images/124"
expected_image = {
"image": {
@@ -419,13 +420,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": href,
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": href,
+ "href": bookmark,
}],
},
}
@@ -557,22 +552,17 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
continue
href = "http://localhost/v1.1/images/%s" % image["id"]
+ bookmark = "http://localhost/images/%s" % image["id"]
test_image = {
"id": image["id"],
"name": image["name"],
"links": [{
"rel": "self",
- "href": "http://localhost/v1.1/images/%s" % image["id"],
- },
- {
- "rel": "bookmark",
- "type": "application/json",
"href": href,
},
{
"rel": "bookmark",
- "type": "application/xml",
- "href": href,
+ "href": bookmark,
}],
}
self.assertTrue(test_image in response_list)
@@ -652,13 +642,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/images/123",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/images/123",
+ "href": "http://localhost/images/123",
}],
},
{
@@ -678,13 +662,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/images/124",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/images/124",
+ "href": "http://localhost/images/124",
}],
},
{
@@ -705,13 +683,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/images/125",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/images/125",
+ "href": "http://localhost/images/125",
}],
},
{
@@ -731,13 +703,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/images/126",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/images/126",
+ "href": "http://localhost/images/126",
}],
},
{
@@ -757,13 +723,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/images/127",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/images/127",
+ "href": "http://localhost/images/127",
}],
},
{
@@ -779,13 +739,7 @@ class ImageControllerWithGlanceServiceTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/images/129",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/images/129",
+ "href": "http://localhost/images/129",
}],
},
]
diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py
index c3ca1431b..0cb16b4c0 100644
--- a/nova/tests/api/openstack/test_servers.py
+++ b/nova/tests/api/openstack/test_servers.py
@@ -290,13 +290,7 @@ class ServersTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/servers/1",
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/servers/1",
+ "href": "http://localhost/servers/1",
},
]
@@ -515,13 +509,7 @@ class ServersTest(test.TestCase):
},
{
"rel": "bookmark",
- "type": "application/json",
- "href": "http://localhost/v1.1/servers/%d" % (i,),
- },
- {
- "rel": "bookmark",
- "type": "application/xml",
- "href": "http://localhost/v1.1/servers/%d" % (i,),
+ "href": "http://localhost/servers/%d" % (i,),
},
]