mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-23 02:08:47 +02:00
Improve unit test performance. (Do not install library we do not use in the tests anyway.) (#92)
This commit is contained in:
parent
ea782c1cf2
commit
5f912dad16
6 changed files with 8 additions and 19 deletions
|
@ -30,10 +30,10 @@ class TestRouterosApiModule(ModuleTestCase):
|
|||
|
||||
def setUp(self):
|
||||
super(TestRouterosApiModule, self).setUp()
|
||||
librouteros = pytest.importorskip("librouteros")
|
||||
self.module = api
|
||||
self.module.LibRouterosError = FakeLibRouterosError
|
||||
self.module.connect = MagicMock(new=fake_ros_api)
|
||||
self.module.check_has_library = MagicMock()
|
||||
self.patch_create_api = patch('ansible_collections.community.routeros.plugins.modules.api.create_api', MagicMock(new=fake_ros_api))
|
||||
self.patch_create_api.start()
|
||||
self.module.Key = MagicMock(new=Key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue