Browse Source

Fix the flavor_ref type of unit tests

Some unit tests define a flavor_ref as tuple type, that seems typo.
This patch fixes it.

Change-Id: I8edd93be630ca78b4a4b33a1544b7421a244ae3f
changes/05/68005/1
Ken'ichi Ohmichi 9 years ago
parent
commit
5191576c27
  1. 6
      nova/tests/api/openstack/compute/plugins/v3/test_servers.py

6
nova/tests/api/openstack/compute/plugins/v3/test_servers.py

@ -2327,7 +2327,7 @@ class ServersControllerCreateTest(test.TestCase):
self.assertEqual(FAKE_UUID, server['id'])
def test_create_instance_admin_password(self):
self.body['server']['flavor_ref'] = 3,
self.body['server']['flavor_ref'] = 3
self.body['server']['admin_password'] = 'testpass'
self.req.body = jsonutils.dumps(self.body)
res = self.controller.create(self.req, self.body).obj
@ -2338,7 +2338,7 @@ class ServersControllerCreateTest(test.TestCase):
def test_create_instance_admin_password_pass_disabled(self):
self.flags(enable_instance_password=False)
self.body['server']['flavor_ref'] = 3,
self.body['server']['flavor_ref'] = 3
self.body['server']['admin_password'] = 'testpass'
self.req.body = jsonutils.dumps(self.body)
res = self.controller.create(self.req, self.body).obj
@ -2347,7 +2347,7 @@ class ServersControllerCreateTest(test.TestCase):
self.assertIn('admin_password', self.body['server'])
def test_create_instance_admin_password_empty(self):
self.body['server']['flavor_ref'] = 3,
self.body['server']['flavor_ref'] = 3
self.body['server']['admin_password'] = ''
self.req.body = jsonutils.dumps(self.body)

Loading…
Cancel
Save