I hit this as well yesterday while testing a nova change locally. I looked into it and I think the problem is that two ports are being deleted in the test, but can be deleted in either order. The unit test assumes that one will be deleted before the other, so when they are deleted in the opposite order than the unit test expects, we get the following:
The mox unit test assumes that my_portid2 will be deleted first, but instead my_portid1 is being deleted. I think the fix for this is just to modify the unit test so it allows deletion in any order
I hit this as well yesterday while testing a nova change locally. I looked into it and I think the problem is that two ports are being deleted in the test, but can be deleted in either order. The unit test assumes that one will be deleted before the other, so when they are deleted in the opposite order than the unit test expects, we get the following:
b'mox3. mox.UnexpectedM ethodCallError: Unexpected method call. unexpected:- expected:+' delete_ port('my_ portid1' ) -> None" delete_ port('my_ portid2' ) -> None"
b"- Client.
b'? ^'
b"+ Client.
b'?
The mox unit test assumes that my_portid2 will be deleted first, but instead my_portid1 is being deleted. I think the fix for this is just to modify the unit test so it allows deletion in any order