mockserver_client
Project description
mockserver_client
It has docker based image: jamesdbloom/mockserver:mockserver-5.13.*
As pip dependency could be found here: https://pypi.org/project/helix-mockserver-client/
In your requirements.txt
or PipFile
add helix-mockserver-client>=*.*.*
Basic usage:
import json
from mockserver_client.mockserver_client import (
MockServerFriendlyClient,
mock_request,
mock_response,
times,
)
mock_server = MockServerFriendlyClient('http://127.0.0.1:1080')
mock_server.expect(mock_request(
path="/" + 'item',
method="POST",
body={
"json": {
"client_id": "unitypoint_bwell",
"client_secret": "fake_client_secret",
"grant_type": "client_credentials",
}
},
),
mock_response(
body=json.dumps(
{
"token_type": "bearer",
"access_token": "fake access_token",
"expires_in": 54000,
}
)
),
timing=times(1),
)
How to pull the image with Docker:
docker pull jamesdbloom/mockserver:mockserver-5.13.2
How to start the server locally with Docker:
docker run -dp 1080:1080 jamesdbloom/mockserver:mockserver-5.13.2 -logLevel DEBUG -serverPort 1080
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for helix_mockserver_client-1.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79d6ef13bb4e031913a3e01421542a4bd7ef4f77035a4d21634b838e104e40e8 |
|
MD5 | 497378f7d753f7c41d1a844d83661fb7 |
|
BLAKE2b-256 | e539e830ebce3df9b513c54c30fbdc0345933bfddcc13bc78f3a1b45dd48f148 |
Close
Hashes for helix_mockserver_client-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ff4b057b76bb10acd1683be57777c76cde3270cadddaaa53f350d7a78835a56 |
|
MD5 | e5b42b7ee179c2361a957ee08f5cc6b5 |
|
BLAKE2b-256 | 0a97721aa0cf60759947c93c949a1a8028cf1b8257fe3036f74919bf10e6964a |