summaryrefslogtreecommitdiff
path: root/nova/tests/api/openstack/compute/plugins/v3/test_services.py
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-10-24 14:50:24 +0900
committerGerrit Code Review <review@openstack.org>2013-10-29 00:48:46 +0000
commitba7f3bf629185fb4c7a23370f3b5e65622d68663 (patch)
treeea74cdebe60ee841c6ffce3ebda4aa9904853ee8 /nova/tests/api/openstack/compute/plugins/v3/test_services.py
parent06c8deabd1b715e139bb95c460f69e05e93a8eb5 (diff)
downloadnova-ba7f3bf629185fb4c7a23370f3b5e65622d68663.tar.gz
Utilizes assertIsNone and assertIsNotNone - tests/api
Using assertTrue and the 'is None' operator to test if an element is None is too python2.4. Our unit testing framework 'testtools' supports assertIsNone and assertIsNotNone, included from python 2.7, which were created for these types of tests. Change-Id: I09f38e219931e0d7ad27f04861d1ebbc3b5e2c5f
Diffstat (limited to 'nova/tests/api/openstack/compute/plugins/v3/test_services.py')
-rw-r--r--nova/tests/api/openstack/compute/plugins/v3/test_services.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_services.py b/nova/tests/api/openstack/compute/plugins/v3/test_services.py
index c6a11073f0..ce80e62b13 100644
--- a/nova/tests/api/openstack/compute/plugins/v3/test_services.py
+++ b/nova/tests/api/openstack/compute/plugins/v3/test_services.py
@@ -240,7 +240,7 @@ class ServicesTest(test.TestCase):
def test_services_enable(self):
def _service_update(context, service_id, values):
- self.assertEqual(values['disabled_reason'], None)
+ self.assertIsNone(values['disabled_reason'])
return test_service.fake_service
self.stubs.Set(db, "service_update", _service_update)