#mocking #proxy #response #ca #api #set

mock_proxy

A simple way to mock out API's if you can set a proxy

15 releases

0.1.4-alpha.1 Jul 28, 2021
0.1.3 Jul 24, 2021

#504 in Testing

Download history 3/week @ 2024-02-21 2/week @ 2024-02-28 21/week @ 2024-03-27 41/week @ 2024-04-03

62 downloads per month

MIT license

26KB
555 lines

Mock Proxy

This library allows you to simply mock out an API (if you can override ssl settings and proxy settings).


lib.rs:

This library was built to help test systems that use libraries which don't provide any testing utilities themselves. It works by overriding the proxy and root ca attributes and intercepting proxy requests, then returning mock responses defined by the user

The following shows how to setup reqwest to send requests to a Proxy instance: simple_test

Dependencies

~4–14MB
~216K SLoC