def findCaseById(self, case_id): """ 根据id找测试用例 :param case_id: :return: """ print("findCaseById") my_db = MysqlDb() sql = "select * from `case` where id='{0}'".format(case_id) results = my_db.query(sql, state="one") return results
def loadAllCaseByApp(self, app): """ 根据app加载全部测试用例 :param app: :return: """ print("loadAllCaseByApp") my_db = MysqlDb() sql = "select * from `case` where app='{0}'".format(app) results = my_db.query(sql) return results
def loadConfigByAppAndKey(self, app, key): """ 根据app和key加载配置 :param app: :param key: :return: """ print("loadConfigByAppAndKey") my_db = MysqlDb() sql = "select * from `config` where app='{0}' and dict_key='{1}'".format(app, key) results = my_db.query(sql, state="one") return results
def loadConfigByAppAndKey(self, app, key): my_db = MysqlDb() sql = "select * from `config` where app='{0}' and dict_key='{1}'".format( app, key) results = my_db.query(sql, state="one") return results
def findCaseById(self, case_id): my_db = MysqlDb() sql = "select * from `case` where id='{0}'".format(case_id) results = my_db.query(sql, state="one") return results
def loadAllCaseByApp(self, app): my_db = MysqlDb() sql = "select * from `case` where app='{0}'".format(app) results = my_db.query(sql) return results