本文整理汇总了Python中pystratum_test.TestDataLayer.TestDataLayer.execute_row0方法的典型用法代码示例。如果您正苦于以下问题:Python TestDataLayer.execute_row0方法的具体用法?Python TestDataLayer.execute_row0怎么用?Python TestDataLayer.execute_row0使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pystratum_test.TestDataLayer.TestDataLayer
的用法示例。
在下文中一共展示了TestDataLayer.execute_row0方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test13
# 需要导入模块: from pystratum_test.TestDataLayer import TestDataLayer [as 别名]
# 或者: from pystratum_test.TestDataLayer.TestDataLayer import execute_row0 [as 别名]
def test13(self):
"""
An exception must be thrown when a query returns more than 1 rows.
"""
with self.assertRaises(ResultException):
sql = 'select * from [dbo].[TST_FOO2] where tst_c00 <= 2'
TestDataLayer.execute_row0(sql)
示例2: test11b
# 需要导入模块: from pystratum_test.TestDataLayer import TestDataLayer [as 别名]
# 或者: from pystratum_test.TestDataLayer.TestDataLayer import execute_row0 [as 别名]
def test11b(self):
"""
A query selecting 0 rows without arguments must return None.
"""
sql = 'select * from [dbo].[TST_FOO2] where tst_c00 <= 0'
ret = TestDataLayer.execute_row0(sql)
self.assertIsNone(ret)
示例3: test11a
# 需要导入模块: from pystratum_test.TestDataLayer import TestDataLayer [as 别名]
# 或者: from pystratum_test.TestDataLayer.TestDataLayer import execute_row0 [as 别名]
def test11a(self):
"""
A query selecting 0 rows with arguments must return None.
"""
sql = 'select %s as "hello" from [dbo].[TST_FOO2] where tst_c00 <= %d'
ret = TestDataLayer.execute_row0(sql, ('hello', 0))
self.assertIsNone(ret)