Beispiel #1
0
 def __init__(self):
     self.db_api = db.get_api()
Beispiel #2
0
Created on 2012-11-6

@author: hzzhoushaoyu
'''

import unittest
from umbrella.common import cfg
from umbrella.common import exception
from umbrella import db
from umbrella.db.sqlalchemy import models

from umbrella.tests import base

CONF = cfg.CONF

DB_API = db.get_api()


class SqlSettingTest(base.IsolatedUnitTest):

    def setUp(self):
        base.IsolatedUnitTest.setUp(self)
        DB_API.configure_db()
        setting_platform_vcpus = dict({"enable": True,
                        "deleted": False,
                        "level": models.PLATFORM_LEVEL,
                        "type": "vcpus",
                        "capacity": 10,
                        "threshold": 80.0,
                        "alarm_title": "test alarm title.",
                        "alarm_content": "test alarm content."})