本文整理汇总了Python中stoqlib.domain.test.domaintest.DomainTest.setUpClass方法的典型用法代码示例。如果您正苦于以下问题:Python DomainTest.setUpClass方法的具体用法?Python DomainTest.setUpClass怎么用?Python DomainTest.setUpClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stoqlib.domain.test.domaintest.DomainTest
的用法示例。
在下文中一共展示了DomainTest.setUpClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpClass
# 需要导入模块: from stoqlib.domain.test.domaintest import DomainTest [as 别名]
# 或者: from stoqlib.domain.test.domaintest.DomainTest import setUpClass [as 别名]
def setUpClass(cls):
DomainTest.setUpClass()
RECREATE_SQL = """
DROP TABLE IF EXISTS dung;
DROP TABLE IF EXISTS dong;
DROP TABLE IF EXISTS ding;
CREATE TABLE ding (
id uuid PRIMARY KEY DEFAULT uuid_generate_v1(),
te_id bigint UNIQUE REFERENCES transaction_entry(id),
int_field integer default 0,
str_field text default ''
);
CREATE TABLE dong (
id uuid PRIMARY KEY DEFAULT uuid_generate_v1(),
te_id bigint UNIQUE REFERENCES transaction_entry(id),
bool_field boolean default false,
ding_id uuid REFERENCES ding(id) ON UPDATE CASCADE
);
CREATE TABLE dung (
id uuid PRIMARY KEY DEFAULT uuid_generate_v1(),
identifier SERIAL NOT NULL,
te_id bigint UNIQUE REFERENCES transaction_entry(id),
ding_id uuid REFERENCES ding(id) ON UPDATE CASCADE
);
"""
cls.store.execute(RECREATE_SQL)
cls.store.commit()
示例2: setUpClass
# 需要导入模块: from stoqlib.domain.test.domaintest import DomainTest [as 别名]
# 或者: from stoqlib.domain.test.domaintest.DomainTest import setUpClass [as 别名]
def setUpClass(cls):
DomainTest.setUpClass()
RECREATE_SQL = """
DROP TABLE IF EXISTS ding;
CREATE TABLE ding (
id uuid PRIMARY KEY DEFAULT uuid_generate_v1(),
te_id bigint UNIQUE REFERENCES transaction_entry(id),
int_field integer default 0,
str_field text default ''
);
"""
cls.store.execute(RECREATE_SQL)
cls.store.commit()
示例3: setUpClass
# 需要导入模块: from stoqlib.domain.test.domaintest import DomainTest [as 别名]
# 或者: from stoqlib.domain.test.domaintest.DomainTest import setUpClass [as 别名]
def setUpClass(cls):
DomainTest.setUpClass()
cls._ui = NFeUI()