@@ -0,0 +1,1661 @@
+# Copyright 2016 Canonical Ltd%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#  http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0Afrom __future__ import absolute_import%0Afrom __future__ import print_function%0A%0Aimport contextlib%0Aimport unittest%0A%0Aimport mock%0A%0Aimport charm.openstack.designate as designate%0A%0A%0Adef FakeConfig(init_dict):%0A%0A    def _config(key=None):%0A        return init_dict%5Bkey%5D if key else init_dict%0A%0A    return _config%0A%0A%0Aclass Helper(unittest.TestCase):%0A%0A    def setUp(self):%0A        self._patches = %7B%7D%0A        self._patches_start = %7B%7D%0A        self.ch_config_patch = mock.patch('charmhelpers.core.hookenv.config')%0A        self.ch_config = self.ch_config_patch.start()%0A        self.ch_config.side_effect = lambda: %7B'ssl_param': None%7D%0A%0A    def tearDown(self):%0A        for k, v in self._patches.items():%0A            v.stop()%0A            setattr(self, k, None)%0A        self._patches = None%0A        self._patches_start = None%0A        self.ch_config_patch.stop()%0A%0A    def patch(self, obj, attr, return_value=None, **kwargs):%0A        mocked = mock.patch.object(obj, attr, **kwargs)%0A        self._patches%5Battr%5D = mocked%0A        started = mocked.start()%0A        started.return_value = return_value%0A        self._%0A

Create test_lib_charm_openstack_trove.py