cisagov / cisagov/pshtt

Unit tests for HTTP endpoints

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
693
Forks
91
PR merge metrics
No merged PRs in 30d

Description

We need unit tests to measure behavior, to prevent regressions and to catch issues early. Testing against live endpoints is not recommended, and testing against a localhost HTTP server is not recommended.

I think we want to use something like [`vcrpy`](https://github.com/kevin1024/vcrpy) or [`betamax`](https://github.com/sigmavirus24/betamax) to capture and replay requests from particular endpoints. We could set up mock endpoints as necessary to capture other expected situations so that they remain recorded for future test runs.

Resolving this issue doesn't require unit testing every single thing, but it does require getting a solid mocked test harness in place with unit tests for at least a few example endpoint configurations, so we can build on that test suite over time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.