Various bigip_pool fixes (#32161)

* corrects copyrights and mocks in unit tests
* fixes module code to include code to cleanup tokens
This commit is contained in:
Tim Rupp 2017-10-25 12:57:21 -07:00 committed by GitHub
commit cc4bbb2929
2 changed files with 17 additions and 22 deletions

View file

@ -1,21 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public Liccense for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
@ -171,8 +157,8 @@ class TestManager(unittest.TestCase):
)
mm = ModuleManager(client)
mm.create_on_device = lambda: True
mm.exists = lambda: False
mm.create_on_device = Mock(return_value=True)
mm.exists = Mock(return_value=False)
results = mm.exec_module()