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-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2b4fa04b06621b77965da49f10aa5d6c5e1210bb1e9f862fc9dadb0bf0ed911 |
|
MD5 | 92cf2d52fb6667f1fe9bd65b35ce5ad3 |
|
BLAKE2b-256 | 9cf9571a3abb8c7f7fa5bb7a6b1dc5da000b65d580dbb28520b92bda2ca892d6 |
Close
Hashes for helix_mockserver_client-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbcef566c6f1067a3e83e95254d052f2de16457f2317a81117dcbc2eb7ca6c33 |
|
MD5 | 9745e7bda373b351af66e9d107c6dc45 |
|
BLAKE2b-256 | 32e7ecee4b5a7251f870e14ac273aae9ddcc398ac788d233a342f844520996bc |