38fad07c0a
When a mock hasn't been provided with a long-enough list of side-effects for the number of times it is called, it raises StopIteration (instead of something sensible like AssertionError). Prior to Python 3.7, this exception could bubble up until it just stopped a task. (In Python 3.7 it will eventually be caught and turned into a RuntimeError.) To ensure that any errors of this sort are not handled silently, and to enable us to test for them prior to using Python 3.7, catch any StopIteration errors coming from plugin-provided non-generator functions and convert them to RuntimeError exceptions. This reveals many errors in the unit tests, many introduced in the process of converting from mox to mock, which are also fixed by this patch. Change-Id: I5a1eff6b704dff7c17edcbbe58cdbc380ae6abc9 Story: #2003412 Task: 24553 |
||
---|---|---|
.. | ||
__init__.py | ||
test_eip.py | ||
test_instance.py | ||
test_instance_network.py | ||
test_loadbalancer.py | ||
test_network_interface.py | ||
test_s3.py | ||
test_security_group.py | ||
test_user.py | ||
test_volume.py | ||
test_waitcondition.py |