ironic/ironic/tests/unit/objects
Ramamani Yeleswarapu 9036e1eb5f Add missing 'autospec' to unit tests - /unit/objects/
Proposing adding [H210] hacking check in tox.ini to require ‘autospec’,
‘spec’, or ‘spec_set’ in mock.patch/mock.patch.object calls.

This patch adds missing 'autospec' or 'spec_set' to unit tests in
/tests/unit/objects/.

By using autospec=True assert errors can be caught. [H210] requires that some
value for autospec, spec, or spec_set is defined. It could be autospec=False.

autospec=True doesn't work on staticmethods: https://bugs.python.org/issue23078
For those cases, using spec_set=types.FunctionType.

More patches to follow to cover all the unit tests to enable [H210] in
tox.ini.

Change-Id: I142b49b092520d453b85db25c2c5f197ff85f3eb
2017-11-09 09:28:10 -08:00
..
__init__.py Prepare for functional testing 2015-09-28 21:27:01 +00:00
test_chassis.py Unit test consistency: DB base and utils prefix 2017-06-20 09:36:21 +01:00
test_conductor.py Add missing 'autospec' to unit tests - /unit/objects/ 2017-11-09 09:28:10 -08:00
test_fields.py Add power state change notifications 2016-10-17 15:39:18 +00:00
test_node.py Unit test consistency: DB base and utils prefix 2017-06-20 09:36:21 +01:00
test_notification.py Add missing 'autospec' to unit tests - /unit/objects/ 2017-11-09 09:28:10 -08:00
test_objects.py Add missing 'autospec' to unit tests - /unit/objects/ 2017-11-09 09:28:10 -08:00
test_port.py Add missing 'autospec' to unit tests - /unit/objects/ 2017-11-09 09:28:10 -08:00
test_portgroup.py Unit test consistency: DB base and utils prefix 2017-06-20 09:36:21 +01:00
test_volume_connector.py Add missing 'autospec' to unit tests - /unit/objects/ 2017-11-09 09:28:10 -08:00
test_volume_target.py Add missing 'autospec' to unit tests - /unit/objects/ 2017-11-09 09:28:10 -08:00
utils.py Add ironic port group CRUD notifications 2017-02-15 11:42:45 +02:00