def test_clean(self): with mock.patch.object(pyipmi.Session, 'establish') as mock_method: with patch.object(pyipmi.chassis.Chassis, 'chassis_control_power_down') as mock_method2: clean_nodes('config/inventory.yaml') tools.assert_equal(mock_method.call_count, 5) tools.assert_equal(mock_method2.call_count, 5)
def run_clean(args): apex.clean_nodes(args.file)