本文整理匯總了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()