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.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26e354a44f7b876de1c195c5a29cd201ec8cf699a260d5c0d7078f6e17bc0791 |
|
MD5 | 57853422d84ff334ab61128db5b63d8c |
|
BLAKE2b-256 | ad6b1b8a1bad15c409a1b173cacb5d32dff90c4e08645a87f5465d26c40ff015 |
Close
Hashes for helix_mockserver_client-1.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ce568ec486dc4b505e86bb0a5ae8c31c3b6d3b6fd18d2723a52f05f32db0ad2 |
|
MD5 | 40673f19cb7ddceb0797e553a60a02d4 |
|
BLAKE2b-256 | fe65c41a47e2cffed4a76ba6feb4686301a397b9b6e66b041727e948887bd6cc |