Refactored test in test_neutron_driver to pass with random PYTHONHASHSEED

Changed argument comparison in mox.Stub from concrete list
to mox.SameElementsAs.

Partial-Bug: #1348818

Change-Id: Id80632ea1c32910d751901c19c98ee76b52eda55
This commit is contained in:
Timofey Durakov 2015-03-03 18:55:52 +03:00
parent 40faea05a8
commit 738e572c42
1 changed files with 3 additions and 2 deletions

View File

@ -267,8 +267,9 @@ class TestNeutronDriver(test.NoDBTestCase):
self.moxed_client.list_ports(device_id=['server_1']).AndReturn(
port_list)
self.moxed_client.list_security_groups(id=['1', '2']).AndReturn(
security_groups_list)
self.moxed_client.\
list_security_groups(id=mox.SameElementsAs(['1', '2'])).AndReturn(
security_groups_list)
self.mox.ReplayAll()
sg_api = neutron_driver.SecurityGroupAPI()