# Path: freezer_api/common/exceptions.py
# class FreezerAPIException(falcon.HTTPError):
# class BadDataFormat(FreezerAPIException):
# class DocumentExists(FreezerAPIException):
# class StorageEngineError(FreezerAPIException):
# class DocumentNotFound(FreezerAPIException):
# class AccessForbidden(FreezerAPIException):
# class MethodNotImplemented(FreezerAPIException):
#     def __init__(self, message=''):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
# 
# Path: freezer_api/tests/unit/common.py
# CONF = cfg.CONF
# def get_fake_backup_metadata():
# def get_fake_job_0():
# def get_fake_job_1():
# def get_fake_job_2():
# def get_fake_job_3():
# def get_fake_job_id():
# def get_fake_client_0():
# def get_fake_client_1():
# def get_fake_client_id():
# def get_fake_action_0():
# def get_fake_action_1():
# def get_fake_action_2():
# def get_fake_action_id():
# def get_fake_action_3():
# def get_fake_session_0():
# def get_fake_session_1():
# def get_fake_session_2():
# def get_fake_session_3():
# def get_fake_session_id():
#     def __init__(self, method='GET', body=''):
#     def get_header(self, key):
#     def setUp(self):
#     def __init__(self, *args, **kwargs):
#     def to_dict(self):
# def get_req_items(name):
# class FakeReqResp(object):
# class FreezerBaseTestCase(testtools.TestCase):
# class FakeContext(object):
# 
# Path: freezer_api/tests/unit/sqlalchemy/base.py
# CONF = cfg.CONF
# _DB_CACHE = None
# IN_MEM_DB_CONN_STRING = 'sqlite://'
#             _DB_CACHE = Database(sqla_api)
# class Database(fixtures.Fixture):
# class DbTestCase(common.FreezerBaseTestCase):
#     def __init__(self, db_api):
#     def initialize_sql_session(self, connection_str):
#     def setup_sqlite(self):
#     def setUp(self):
#     def setUp(self):


import copy
from unittest import mock
from unittest.mock import patch
from freezer_api.common import exceptions as freezer_api_exc
from freezer_api.tests.unit import common
from freezer_api.tests.unit.sqlalchemy import base
# 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.

"""Tests for manipulating job via the DB API"""




class DbSessionTestCase(base.DbTestCase):

    def setUp(self):
        super(DbSessionTestCase, self).setUp()
        self.fake_session_0 = common.get_fake_session_0()
        self.fake_project_id = self.fake_session_0.get('project_id')
        self.fake_user_id = self.fake_session_0.get('user_id')
        self.fake_session_0.pop('session_id')
        self.fake_session_2 = common.get_fake_session_2()
        self.fake_session_2.pop('session_id')
        self.fake_session_3 = common.get_fake_session_3()
        self.fake_session_3.pop('session_id')

# Path: freezer_api/common/exceptions.py
# class FreezerAPIException(falcon.HTTPError):
# class BadDataFormat(FreezerAPIException):
# class DocumentExists(FreezerAPIException):
# class StorageEngineError(FreezerAPIException):
# class DocumentNotFound(FreezerAPIException):
# class AccessForbidden(FreezerAPIException):
# class MethodNotImplemented(FreezerAPIException):
#     def __init__(self, message=''):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
#     def handle(ex, req, resp, params):
# 
# Path: freezer_api/tests/unit/common.py
# CONF = cfg.CONF
# def get_fake_backup_metadata():
# def get_fake_job_0():
# def get_fake_job_1():
# def get_fake_job_2():
# def get_fake_job_3():
# def get_fake_job_id():
# def get_fake_client_0():
# def get_fake_client_1():
# def get_fake_client_id():
# def get_fake_action_0():
# def get_fake_action_1():
# def get_fake_action_2():
# def get_fake_action_id():
# def get_fake_action_3():
# def get_fake_session_0():
# def get_fake_session_1():
# def get_fake_session_2():
# def get_fake_session_3():
# def get_fake_session_id():
#     def __init__(self, method='GET', body=''):
#     def get_header(self, key):
#     def setUp(self):
#     def __init__(self, *args, **kwargs):
#     def to_dict(self):
# def get_req_items(name):
# class FakeReqResp(object):
# class FreezerBaseTestCase(testtools.TestCase):
# class FakeContext(object):
# 
# Path: freezer_api/tests/unit/sqlalchemy/base.py
# CONF = cfg.CONF
# _DB_CACHE = None
# IN_MEM_DB_CONN_STRING = 'sqlite://'
#             _DB_CACHE = Database(sqla_api)
# class Database(fixtures.Fixture):
# class DbTestCase(common.FreezerBaseTestCase):
#     def __init__(self, db_api):
#     def initialize_sql_session(self, connection_str):
#     def setup_sqlite(self):
#     def setUp(self):
#     def setUp(self):


# Path: freezer_api/tests/unit/sqlalchemy/v2/test_session.py
import copy
from unittest import mock
from unittest.mock import patch
from freezer_api.common import exceptions as freezer_api_exc
from freezer_api.tests.unit import common
from freezer_api.tests.unit.sqlalchemy import base

# 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.

"""Tests for manipulating job via the DB API"""




class DbSessionTestCase(base.DbTestCase):

    def setUp(self):
        super(DbSessionTestCase, self).setUp()
        self.fake_session_0 = common.get_fake_session_0()
        self.fake_project_id = self.fake_session_0.get('project_id')
        self.fake_user_id = self.fake_session_0.get('user_id')
        self.fake_session_0.pop('session_id')
        self.fake_session_2 = common.get_fake_session_2()
        self.fake_session_2.pop('session_id')
        self.fake_session_3 = common.get_fake_session_3()
        self.fake_session_3.pop('session_id')

        self.fake_session_id = common.get_fake_session_id()