Ejemplo n.º 1
0
        list2.append(data_res['top'])
        # list1.append(data_database['logicType'])
        # list2.append(data_res['logicType'])
        Log.info('compare data is database :{}'.format(list1))
        Log.info('compare data is interface :{}'.format(list2))
        if list1 == list2:
            return True
        return False

    @staticmethod
    def get_list_by_accept_check(res):
        code = '00000'
        message = '成功'
        if res['code'] == code and res['message'] == message:
            Log.info('actual res check is 1 ,success !')
            return 1
        Log.error('请求返回有误!{}'.format(res))
        return 0


if __name__ == '__main__':
    Log.debug('*' * 50)
    cv = CalGet(node=1)
    ck = Login(node=1)
    cookie = ck.get_cookie()
    # cookie =None
    para_id = 20
    data_id = 20001
    cv.base_get_server(para_id, data_id, cookie)
    Log.debug('*' * 50)
Ejemplo n.º 2
0
 def modify_cookies(self, data_id, node):
     """获取automation登录后cookie"""
     self.before_modify_check()
     L = Login(node=node)
     cookie_modify = L.get_cookie(data_id=data_id)
     return cookie_modify