Skip to main content

Web server for testing.

Project description

https://travis-ci.org/narusemotoki/htttea.svg?branch=master

I’m not a tea pot. Provide a web server for testing.

CHANGELOG

Usage

response_body = b"Hello World"
with htttea.Htttea() as t3:
    t3.response = htttea.Response(body=response_body)
    response = requests.post(t3.url, data=data)

    assert t3.request.data == data
    assert response.text == response_body.decode()

Htttea makes a real web server when it is called with with statement. You can get a web server URL from url property.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

htttea-0.0.1.tar.gz (4.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page