HTTPretty

码农软件 · 软件分类 · 网络工具包 · 2019-02-28 08:43:01

软件介绍

HTTPretty 是一个 Python 的 HTTP 客户端模拟工具。

示例代码:

import requests
from sure import expect
from httpretty import HTTPretty
from httpretty import httprettified


@httprettified
def test_yipit_api_returning_deals():
    HTTPretty.register_uri(HTTPretty.GET, "http://api.yipit.com/v1/deals/",
                           body='[{"title": "Test Deal"}]',
                           content_type="application/json")

    response = requests.get('http://api.yipit.com/v1/deals/')

    expect(response.json()).to.equal([{"title": "Test Deal"}])

本文地址:https://www.codercto.com/soft/d/299.html

Geometric Folding Algorithms

Geometric Folding Algorithms

Erik D Demaine / Cambridge University Press / 2008-8-21 / GBP 35.99

Did you know that any straight-line drawing on paper can be folded so that the complete drawing can be cut out with one straight scissors cut? That there is a planar linkage that can trace out any alg......一起来看看 《Geometric Folding Algorithms》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

随机密码生成器
随机密码生成器

多种字符组合密码