diff options
author | zhang-jinnan <ben.os@99cloud.net> | 2014-02-17 20:09:28 +0800 |
---|---|---|
committer | zhang-jinnan <ben.os@99cloud.net> | 2014-02-19 12:12:12 +0800 |
commit | 93f9e68ca22d19fdc636b7d50a4d08e4ea07d80e (patch) | |
tree | c98ddfb424e4040143d59109b7e9b33a151ef277 | |
parent | 7cf73f19423f53a7eddc221fddbd60a610aa47a7 (diff) | |
download | python-novaclient-93f9e68ca22d19fdc636b7d50a4d08e4ea07d80e.tar.gz |
Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.
Change-Id: I6deee90c31adf61d80e2678a5f29ba9e187281c9
-rw-r--r-- | novaclient/tests/test_client.py | 2 | ||||
-rw-r--r-- | novaclient/tests/v1_1/test_floating_ips.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/novaclient/tests/test_client.py b/novaclient/tests/test_client.py index 581776ca..d5867024 100644 --- a/novaclient/tests/test_client.py +++ b/novaclient/tests/test_client.py @@ -205,7 +205,7 @@ class ClientTest(utils.TestCase): def test_get_password_none(self): cs = novaclient.client.HTTPClient("user", None, "", "") - self.assertEqual(cs._get_password(), None) + self.assertIsNone(cs._get_password()) def test_get_password_func(self): cs = novaclient.client.HTTPClient("user", None, "", "") diff --git a/novaclient/tests/v1_1/test_floating_ips.py b/novaclient/tests/v1_1/test_floating_ips.py index 337db3e2..0b2313f5 100644 --- a/novaclient/tests/v1_1/test_floating_ips.py +++ b/novaclient/tests/v1_1/test_floating_ips.py @@ -41,7 +41,7 @@ class FloatingIPsTest(utils.TestCase): def test_create_floating_ip(self): fl = cs.floating_ips.create() cs.assert_called('POST', '/os-floating-ips') - self.assertEqual(fl.pool, None) + self.assertIsNone(fl.pool) self.assertIsInstance(fl, floating_ips.FloatingIP) def test_create_floating_ip_with_pool(self): |