diff options
author | Clark Boylan <clark.boylan@gmail.com> | 2014-08-13 16:21:23 -0700 |
---|---|---|
committer | Davanum Srinivas (dims) <davanum@gmail.com> | 2014-08-14 00:56:59 +0000 |
commit | 220ccb816c75fe72f32a3112dae0b3c0790645fe (patch) | |
tree | b66026a4e3fc207154ba0ee0d7c42c945da74e8b | |
parent | 04a26eba7b3a327bf74c31a509b7a129f38114fb (diff) | |
download | oslo-messaging-220ccb816c75fe72f32a3112dae0b3c0790645fe.tar.gz |
Make tests pass with random python hashseed
Under python3 and latest tox a random python hashseed is used. Currently
oslo.messaging tests do not pass this because one test assumes the
resulting list conversion from a list of lists has a specific order.
Sort both lists so that the order is explicit when checking for equality
in this test. Doing so makes the test pass with a random python hash
seed.
Note I am not actually familiar enough with oslo.messaging to know if
this failure is correct and the drivers or something deeper should be
returning lists with an explicit order. This would be the case if order
in these lists is important.
Change-Id: Id54ca1f448f466304b72b1695a5c646311bbd453
-rw-r--r-- | tests/notify/test_notifier.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/notify/test_notifier.py b/tests/notify/test_notifier.py index 3c0442c..9fda806 100644 --- a/tests/notify/test_notifier.py +++ b/tests/notify/test_notifier.py @@ -498,7 +498,8 @@ group_1: with mock.patch.object(self.router, '_get_drivers_for_message', drivers_mock): self.notifier.info({}, 'my_event', {}) - self.assertEqual(['rpc', 'foo'], pm.map.call_args[0][6]) + self.assertEqual(sorted(['rpc', 'foo']), + sorted(pm.map.call_args[0][6])) def test_notify_filtered(self): self.config(routing_notifier_config="routing_notifier.yaml") |