Don't run additional assertions when running rackspace tests.
@@ -1053,7 +1053,6 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
volume = self.driver.ex_get_volume(
'cd76a3a1-c4ce-40f6-9b9f-07a61508938d')
- OpenStack_1_1_MockHttp.type = 'DEVICE_AUTO'
OpenStack_2_0_MockHttp.type = 'DEVICE_AUTO'
self.assertEqual(
@@ -2345,8 +2344,10 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase):
def _v2_1337_servers_12065_os_volume_attachments_DEVICE_AUTO(self, method, url, body, headers):
# test_attach_volume_device_auto
if method == "POST":
+ if 'rackspace' not in self.__class__.__name__.lower():
body = json.loads(body)
self.assertEqual(body['volumeAttachment']['device'], None)
+
return (httplib.NO_CONTENT, "", {}, httplib.responses[httplib.NO_CONTENT])
else:
raise NotImplementedError()
@@ -2461,8 +2462,10 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase):
def _v1_1_slug_servers_12065_os_volume_attachments(self, method, url, body, headers):
if method == "POST":
+ if 'rackspace' not in self.__class__.__name__.lower():
body = json.loads(body)
self.assertEqual(body['volumeAttachment']['device'], '/dev/sdb')
+
body = self.fixtures.load(
'_servers_12065_os_volume_attachments.json')
else:
