コード例 #1
0
	def step_delete(self):
		with policedb.app.app_context():
			db = policedb.get_DB()
			cur = db.execute('delete from tblData where tblData.caseCode="HY999999"')
			db.commit()
			cur = db.execute('select * from tblData where tblData.caseCode="HY999999"')
			res = cur.fetchall()
			assert len(res) is 0
コード例 #2
0
	def step_add(self):
		with policedb.app.app_context():
			to_add = (None, 
				'HY999999', 
				'12/12/2015 12:12:12',
				'0',
				0,
				0,
				'0',
				'0',
				'0',
				'2850')
			db = policedb.get_DB()
			cur = db.execute('insert into tblData values(?,?,?,?,?,?,?,?,?,?)', to_add)
			# res = cur.fetchall()
			db.commit()