本文整理汇总了Python中stoqlib.domain.test.domaintest.DomainTest类的典型用法代码示例。如果您正苦于以下问题:Python DomainTest类的具体用法?Python DomainTest怎么用?Python DomainTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DomainTest类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: tearDown
def tearDown(self):
store = new_store()
for person in store.find(Person, name=NAME):
store.remove(person)
store.commit()
DomainTest.tearDown(self)
store.close()
开发者ID:leandrorchaves,项目名称:stoq,代码行数:7,代码来源:test_transaction.py
示例2: tearDown
def tearDown(self):
# Make sure to remove all committed persons from the database
with new_store() as store:
test_names = [u'dummy transaction test', u'dummy', u'doe', u'john']
store.find(Person, Person.name.is_in(test_names)).remove()
DomainTest.tearDown(self)
开发者ID:Guillon88,项目名称:stoq,代码行数:7,代码来源:test_transaction.py
示例3: setUpClass
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()
开发者ID:Guillon88,项目名称:stoq,代码行数:28,代码来源:test_base_domain.py
示例4: setUp
def setUp(self):
DomainTest.setUp(self)
self._base_category = SellableCategory(description=u"Cigarro",
store=self.store)
self._category = SellableCategory(description=u"Hollywood",
category=self._base_category,
suggested_markup=10,
store=self.store)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:8,代码来源:test_sellable.py
示例5: tearDown
def tearDown(self):
DomainTest.tearDown(self)
try:
os.unlink(self._filename)
except OSError:
pass
if self._pdf_html:
try:
os.unlink(self._pdf_html)
except OSError:
pass
开发者ID:leandrorchaves,项目名称:stoq,代码行数:11,代码来源:test_boleto.py
示例6: tearDown
def tearDown(self):
sys.excepthook = self._old_hook
DomainTest.tearDown(self)
messages = test_system_notifier.reset()
if messages:
self.fail("Unhandled messages: %r, use @mock.patch()" % (
messages, ))
if self._unhandled_exceptions:
self.fail("Unhandled exceptions: %r" % (
self._unhandled_exceptions))
开发者ID:rosalin,项目名称:stoq,代码行数:12,代码来源:uitestutils.py
示例7: setUpClass
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()
开发者ID:LeonamSilva,项目名称:stoq,代码行数:13,代码来源:test_base_domain.py
示例8: setUp
def setUp(self):
DomainTest.setUp(self)
self._filename = tempfile.mktemp(prefix="stoqlib-test-boleto-",
suffix=".pdf")
self._pdf_html = None
开发者ID:leandrorchaves,项目名称:stoq,代码行数:5,代码来源:test_boleto.py
示例9: setUp
def setUp(self):
DomainTest.setUp(self)
sellable = self.create_sellable()
self.product = Product(sellable=sellable,
store=self.store)
开发者ID:romaia,项目名称:stoq,代码行数:5,代码来源:test_product.py
示例10: setUp
def setUp(self):
DomainTest.setUp(self)
self.sparam = sysparam
开发者ID:Guillon88,项目名称:stoq,代码行数:3,代码来源:test_parameters.py
示例11: setUp
def setUp(self):
DomainTest.setUp(self)
self.qe = QueryExecuter(self.store)
self.qe.set_search_spec(ClientCategory)
self.sfilter = mock.Mock()
self.qe.set_filter_columns(self.sfilter, ['name'])
开发者ID:Joaldino,项目名称:stoq,代码行数:6,代码来源:test_queryexecuter.py
示例12: setUp
def setUp(self):
DomainTest.setUp(self)
self.branch = self.create_branch()
开发者ID:Guillon88,项目名称:stoq,代码行数:3,代码来源:test_synchronization.py
示例13: setUp
def setUp(self):
self._unhandled_exceptions = []
self._old_hook = sys.excepthook
sys.excepthook = self._except_hook
test_system_notifier.reset()
DomainTest.setUp(self)
开发者ID:rosalin,项目名称:stoq,代码行数:6,代码来源:uitestutils.py
示例14: setUpClass
def setUpClass(cls):
DomainTest.setUpClass()
cls._ui = NFeUI()
开发者ID:adrianoaguiar,项目名称:stoq,代码行数:3,代码来源:test_nfe.py
注:本文中的stoqlib.domain.test.domaintest.DomainTest类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论