Merge "Use assertTrue/False instead of assertEqual(T/F)"
This commit is contained in:
commit
771367ec38
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user