def test_get_plugin_manager_check_caches(self):
    self.patch_object(conncheck, '_conncheck_plugin_managers', new={}, name='mock__conncheck_plugin_managers')
    self.mock__conncheck_plugin_managers['a-name'] = 'a-manager'
    self.patch_object(conncheck, 'ConnCheckPluginManager', name='mock_ConnCheckPluginManager')
    self.mock_ConnCheckPluginManager.return_value = 'the-manager'
    self.assertEqual(conncheck.get_plugin_manager('a-name'), 'a-manager')
    self.mock_ConnCheckPluginManager.assert_not_called()
def test_get_plugin_manager_check_caches(self):
    self.patch_object(conncheck, '_conncheck_plugin_managers', new={}, name='mock__conncheck_plugin_managers')
    self.mock__conncheck_plugin_managers['a-name'] = 'a-manager'
    self.patch_object(conncheck, 'ConnCheckPluginManager', name='mock_ConnCheckPluginManager')
    self.mock_ConnCheckPluginManager.return_value = 'the-manager'
    self.assertEqual(conncheck.get_plugin_manager('a-name'), 'a-manager')
    self.mock_ConnCheckPluginManager.assert_not_called()