# Path: monasca_notification/common/repositories/orm/orm_repo.py
# LOG = logging.getLogger(__name__)
# CONF = cfg.CONF
# class OrmRepo(object):
#     def __init__(self):
#     def fetch_notifications(self, alarm):
#     def get_alarm_current_state(self, alarm_id):
#     def fetch_notification_method_types(self):
#     def insert_notification_method_types(self, notification_types):
#     def get_notification(self, notification_id):
# 
# Path: tests/base.py
# class DisableStatsdFixture(fixtures.Fixture):
# class ConfigFixture(oo_cfg.Config):
# class BaseTestCase(oslotest_base.BaseTestCase):
# class PluginTestCase(BaseTestCase):
#     def setUp(self):
#     def __init__(self):
#     def setUp(self):
#     def _clean_config_loaded_flag():
#     def setUp(self):
#     def conf_override(**kw):
#     def conf_default(**kw):
#     def setUp(self, register_opts=None):


from unittest import mock
from monasca_notification.common.repositories.orm import orm_repo
from tests import base
# Copyright 2017 FUJITSU LIMITED
#
# 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.




class TestOrmRepo(base.BaseTestCase):

    @mock.patch('monasca_notification.common.repositories.orm.orm_repo.engine_from_config')
    def setUp(self, mock_sql_engine_from_config):
        super(TestOrmRepo, self).setUp()
        self.conf_default(
            group='orm', url='mysql+pymysql://user:password@hostname:3306/mon'
        )

# Path: monasca_notification/common/repositories/orm/orm_repo.py
# LOG = logging.getLogger(__name__)
# CONF = cfg.CONF
# class OrmRepo(object):
#     def __init__(self):
#     def fetch_notifications(self, alarm):
#     def get_alarm_current_state(self, alarm_id):
#     def fetch_notification_method_types(self):
#     def insert_notification_method_types(self, notification_types):
#     def get_notification(self, notification_id):
# 
# Path: tests/base.py
# class DisableStatsdFixture(fixtures.Fixture):
# class ConfigFixture(oo_cfg.Config):
# class BaseTestCase(oslotest_base.BaseTestCase):
# class PluginTestCase(BaseTestCase):
#     def setUp(self):
#     def __init__(self):
#     def setUp(self):
#     def _clean_config_loaded_flag():
#     def setUp(self):
#     def conf_override(**kw):
#     def conf_default(**kw):
#     def setUp(self, register_opts=None):


# Path: tests/test_orm_repo.py
from unittest import mock
from monasca_notification.common.repositories.orm import orm_repo
from tests import base

# Copyright 2017 FUJITSU LIMITED
#
# 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.




class TestOrmRepo(base.BaseTestCase):

    @mock.patch('monasca_notification.common.repositories.orm.orm_repo.engine_from_config')
    def setUp(self, mock_sql_engine_from_config):
        super(TestOrmRepo, self).setUp()
        self.conf_default(
            group='orm', url='mysql+pymysql://user:password@hostname:3306/mon'
        )

        self._rep = orm_repo.OrmRepo()