• HttpRunner 使用小结 at December 23, 2019

    获取cookie处有一个问题,getmtime()是文件最后修改时间,而不是getctime()

  • docker 搭建 mysql at October 28, 2019

    我就是想做一下自己的学习内容的总结,菜鸟一个,这个网站不允许写基础的东西?如果不允许以后就不在这个上边发了

  • 谢谢

  • 1

  • 一辈子那么长,我都给你

  • 这部戏太甜了,分不清戏内戏外

  • 《爱情与灵药》台词:I used to worry a lot about who I'll be when I grow up. Like how much money I'd make, or someday I become some big deal. Sometimes the things you want the most doesn't happen, and sometimes the thing you never expect happen does. I don't know - you meet thousands of people and none of them really touch you. And then you meet that one person and your life is changed. Forever.
    我以前总是担心自己长大后会怎么样。赚多少钱。会不会有一天出人头地。有时候你最是盼星星盼月亮的事儿就是不会发生,可意想不到的那些却自然而然地来了。我说不清楚为什么,你遇见过千百个人,而他们只不过是匆匆过客;接着你就邂逅了那么一个人,改变了你的生命直到永远。

    自己:不是每个人都能在短暂的生命里遇到自己的真爱,若遇到请珍爱。(致最爱的演员安妮海瑟薇)

  • 作业1

    import requests
    import logging
    import pytest
    import json
    import jsonpath
    from hamcrest import *

    class TestRequests(object):
    logging.basicConfig(level=logging.INFO)
    url="https://testerhome.com/api/v3/topics.json?limit=2"

    def test_xueqiu_quote(self):
    url="https://stock.xueqiu.com/v5/stock/portfolio/stock/list.json?"
    r=requests.get(url,
    params={ "category": "2"},
    headers={'User-Agent': 'Xueqiu Android 11.19'},
    cookies={"u": "3446260779", "xq_a_token":"5806a70c6bc5d5fb2b00978aeb1895532fffe502"}
    )
    logging.info(jsonpath.jsonpath(r.json(),"$.data.stocks[*].name"))
    assert_that(jsonpath.jsonpath(r.json(),"$.data.stocks[*].name"),any_of(has_item("招商银行"),has_item("平安银行")))
  • 接口用例怎样写才是全面的

  • 课间作业1:

    课间作业2:

    def test_xueqiu(self):
    url="https://stock.xueqiu.com/v5/stock/portfolio/stock/list.json?"
    param={"category":"1"}
    cookie={"xq_a_token":"5806a70c6bc5d5fb2b00978aeb1895532fffe502","u":"3446260779"}
    header={"User-Agent":"Xueqiu Android 11.19","Host":"stock.xueqiu.com"}
    r=requests.get(url,params=param,headers=header,cookies=cookie)
    logging.info(json.dumps(r.json(),indent=2))

测试菜鸟,写的内容比较基础,只为提升自己的技术水平做一些总结,玻璃心,勿喷!!