charm-ceph-fs/unit_tests/__init__.py
Frode Nordahl ff7ff85779
Fix Ceph upgrade issue by porting charm to common framework
Move helpers as-is from reactive handler module to charm class.

Set default of ``source`` configuration option to 'distro' to be
in line with other reactive charms and the expectations of the
``openstack.utils.get_source_and_pgp_key`` function.

Unpin flake8.

Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/313
Depends-On: I6fbde855ba8f83ef5e265bd5b5dfb0d01eae830b
Change-Id: I2d8e8b244db935673406d2cce9ef34e7252cb50b
Closes-Bug: #1879072
2020-06-12 08:24:57 +02:00

27 lines
900 B
Python

# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import unittest.mock as mock
sys.path.append('src')
sys.path.append('src/lib')
# Mock out charmhelpers so that we can test without it.
import charms_openstack.test_mocks # noqa
charms_openstack.test_mocks.mock_charmhelpers()
sys.modules['dns'] = mock.MagicMock()
sys.modules['dns.resolver'] = mock.MagicMock()