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
tags/2014.1.b3
Ken'ichi Ohmichi 5 years ago
parent
commit
5191576c27
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      nova/tests/api/openstack/compute/plugins/v3/test_servers.py

+ 3
- 3
nova/tests/api/openstack/compute/plugins/v3/test_servers.py View File

@@ -2327,7 +2327,7 @@ class ServersControllerCreateTest(test.TestCase):
2327 2327
         self.assertEqual(FAKE_UUID, server['id'])
2328 2328
 
2329 2329
     def test_create_instance_admin_password(self):
2330
-        self.body['server']['flavor_ref'] = 3,
2330
+        self.body['server']['flavor_ref'] = 3
2331 2331
         self.body['server']['admin_password'] = 'testpass'
2332 2332
         self.req.body = jsonutils.dumps(self.body)
2333 2333
         res = self.controller.create(self.req, self.body).obj
@@ -2338,7 +2338,7 @@ class ServersControllerCreateTest(test.TestCase):
2338 2338
 
2339 2339
     def test_create_instance_admin_password_pass_disabled(self):
2340 2340
         self.flags(enable_instance_password=False)
2341
-        self.body['server']['flavor_ref'] = 3,
2341
+        self.body['server']['flavor_ref'] = 3
2342 2342
         self.body['server']['admin_password'] = 'testpass'
2343 2343
         self.req.body = jsonutils.dumps(self.body)
2344 2344
         res = self.controller.create(self.req, self.body).obj
@@ -2347,7 +2347,7 @@ class ServersControllerCreateTest(test.TestCase):
2347 2347
         self.assertIn('admin_password', self.body['server'])
2348 2348
 
2349 2349
     def test_create_instance_admin_password_empty(self):
2350
-        self.body['server']['flavor_ref'] = 3,
2350
+        self.body['server']['flavor_ref'] = 3
2351 2351
         self.body['server']['admin_password'] = ''
2352 2352
         self.req.body = jsonutils.dumps(self.body)
2353 2353
 

Loading…
Cancel
Save