Skip to main content

lemoncheesecake-requests

https://github.com/lemoncheesecake/lemoncheesecake-requests/actions/workflows/tests.yml/badge.svg https://codecov.io/gh/lemoncheesecake/lemoncheesecake-requests/branch/master/graph/badge.svg https://img.shields.io/pypi/v/lemoncheesecake-requests.svg https://img.shields.io/pypi/pyversions/lemoncheesecake-requests.svg

lemoncheesecake-requests provides logging facilities to requests for tests written with the lemoncheesecake test framework.

In this example, we implement a very basic test on a Github API endpoint:

# suites/github.py

import lemoncheesecake.api as lcc
from lemoncheesecake.matching import *
from lemoncheesecake_requests import Session, is_2xx

@lcc.test()
def get_org():
    session = Session(base_url="https://api.github.com")

    resp = session.get("/orgs/lemoncheesecake"). \
      require_status_code(is_2xx()). \
      check_json({
        "id": is_integer(),
        "name": equal_to("lemoncheesecake")
      })

We run the test:

$ lcc run
=================================== github ====================================
 OK  1 # github.get_org

Statistics :
 * Duration: 0.214s
 * Tests: 1
 * Successes: 1 (100%)
 * Failures: 0

And here is the report details :

test result

Installation

Install through pip:

$ pip install lemoncheesecake-requests

lemoncheesecake-requests is compatible with Python 3.7-3.10.

Features

  • request/response data logging into lemoncheesecake

  • response status code checking using lemoncheesecake matching mechanism

Documentation

The documentation is available on https://lemoncheesecake-requests.readthedocs.io.

Contact

Bug reports and improvement ideas are welcomed in tickets. A Google Groups forum is also available for discussions about lemoncheesecake: https://groups.google.com/forum/#!forum/lemoncheesecake.

Metadata

Release files for lemoncheesecake-requests 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lemoncheesecake-requests 0.4.0
File Size Uploaded Provenance
lemoncheesecake-requests-0.4.0.tar.gz 8.0 kB Without provenance Details

Release files / lemoncheesecake-requests-0.4.0.tar.gz

Download URL lemoncheesecake-requests-0.4.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
eba0db3451faa92a64e8296e5904c7a1b9c8dc6ca2d9dd2732c75e68bbc5fa8d
BLAKE2b-256 checksum
How to use checksums
8ce2eac202c9b3eb8d29502439bc2d7c54639f2be478ccfc10e19d9dc3d6b1bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.26.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Security for lemoncheesecake-requests 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page