Metadata-Version: 2.1
Name: pytest-cloudflare-worker
Version: 0.0.1
Summary: pytest plugin for testing cloudflare workers
Home-page: https://github.com/samuelcolvin/pytest-cloudflare-worker
Author: Samuel Colvin
Author-email: s@muelcolvin.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Environment :: MacOS X
Classifier: Topic :: Internet
Classifier: Framework :: Pytest
Classifier: Framework :: AsyncIO
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests (>=2.24.0)
Requires-Dist: websockets (>=8.1)
Requires-Dist: pytest (>=6.0.0)
Requires-Dist: toml (>=0.10.1)

# pytest-cloudflare-worker

[![CI](https://github.com/samuelcolvin/pytest-cloudflare-worker/workflows/ci/badge.svg?event=push)](https://github.com/samuelcolvin/pytest-cloudflare-worker/actions?query=event%3Apush+branch%3Amaster+workflow%3Aci)
[![Coverage](https://codecov.io/gh/samuelcolvin/pytest-cloudflare-worker/branch/master/graph/badge.svg)](https://codecov.io/gh/samuelcolvin/pytest-cloudflare-worker)
[![pypi](https://img.shields.io/pypi/v/pytest-cloudflare-worker.svg)](https://pypi.python.org/pypi/pytest-cloudflare-worker)
[![versions](https://img.shields.io/pypi/pyversions/pytest-cloudflare-worker.svg)](https://github.com/samuelcolvin/pytest-cloudflare-worker)
[![license](https://img.shields.io/github/license/samuelcolvin/pytest-cloudflare-worker.svg)](https://github.com/samuelcolvin/pytest-cloudflare-worker/blob/master/LICENSE)

CloudFlare worker system tests packaged as a pytest plugin.

Features:

* [x] **real environment** - the plugin deploys your worker to a preview environment, then routes real HTTPS
  requests to the worker so you get a true environment in tests
* [x] **advanced features** - like environment variables and KV worker database work out of the box
* [x] **wrangler integration** - the plugin integrated with [wrangler](https://github.com/cloudflare/wrangler) to build
  your worker and setup bindings like environment variables and KV worker namespaces
* [x] **logging** - logs from workers using `console.log(...)` are available in tests

**In beta, this package is currently active development, API may change at any time**

## Install

```bash
pip install pytest-cloudflare-worker
```

## Usage

TODO


