Merge "Use assertTrue/False instead of assertEqual(T/F)"

This commit is contained in:
Jenkins 2016-01-07 12:49:09 +00:00 committed by Gerrit Code Review
commit 771367ec38
3 changed files with 6 additions and 6 deletions

View File

@ -104,7 +104,7 @@ class TestZmqBasics(zmq_common.ZmqBaseTestCase):
self.listener._received.wait()
self.assertIsNone(result)
self.assertEqual(True, self.listener._received.isSet())
self.assertTrue(self.listener._received.isSet())
method = self.listener.message.message[u'method']
self.assertEqual(u'hello-world', method)
@ -121,7 +121,7 @@ class TestZmqBasics(zmq_common.ZmqBaseTestCase):
self.listener._received.wait()
self.assertIsNone(result)
self.assertEqual(True, self.listener._received.isSet())
self.assertTrue(self.listener._received.isSet())
method = self.listener.message.message[u'method']
self.assertEqual(u'hello-world', method)

View File

@ -65,13 +65,13 @@ class TestPubSub(zmq_common.ZmqBaseTestCase):
def _check_listener(self, listener):
listener._received.wait(timeout=5)
self.assertEqual(True, listener._received.isSet())
self.assertTrue(listener._received.isSet())
method = listener.message.message[u'method']
self.assertEqual(u'hello-world', method)
def _check_listener_negative(self, listener):
listener._received.wait(timeout=1)
self.assertEqual(False, listener._received.isSet())
self.assertFalse(listener._received.isSet())
def test_single_listener(self):
target = oslo_messaging.Target(topic='testtopic', fanout=True)

View File

@ -279,7 +279,7 @@ class TestRPCServer(test_utils.BaseTestCase, ServerSetupMixin):
self.assertIsNone(client.call({}, 'ping', arg=None))
self.assertEqual(0, client.call({}, 'ping', arg=0))
self.assertEqual(False, client.call({}, 'ping', arg=False))
self.assertFalse(client.call({}, 'ping', arg=False))
self.assertEqual([], client.call({}, 'ping', arg=[]))
self.assertEqual({}, client.call({}, 'ping', arg={}))
self.assertEqual('dsdsfoo', client.call({}, 'ping', arg='foo'))
@ -299,7 +299,7 @@ class TestRPCServer(test_utils.BaseTestCase, ServerSetupMixin):
direct = client.prepare(server='testserver')
self.assertIsNone(direct.call({}, 'ping', arg=None))
self.assertEqual(0, client.call({}, 'ping', arg=0))
self.assertEqual(False, client.call({}, 'ping', arg=False))
self.assertFalse(client.call({}, 'ping', arg=False))
self.assertEqual([], client.call({}, 'ping', arg=[]))
self.assertEqual({}, client.call({}, 'ping', arg={}))
self.assertEqual('dsdsfoo', direct.call({}, 'ping', arg='foo'))