def test_pro_select(): c = cmd.get_cmd("product", "select", "select * from product") pMgr = ProductManager(db) ret = pMgr.execute_command(c) print ret
def test_pro_update(): c = cmd.get_cmd("product", "update", "update product set name='one' where id = 2") pMgr = ProductManager(db) ret = pMgr.execute_command(c) print ret
def text_login(): c = cmd.get_cmd("user", "login", "select * from user where name='admin' and password='******'") uMgr = UserManager(db) res = uMgr.execute_command(c) print res