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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15043725774aa2b4b63a0ca044ab6f524a5425e94a816c79c6b1e7603f59c350 |
|
MD5 | 48bf3dba64eb9216a02c8f2086fb6dad |
|
BLAKE2b-256 | fea225bdfb50575d5d423ac3fb3e4348e4b4147d97434c904a418d6186795fd6 |
Close
Hashes for helix_mockserver_client-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c93dc8bb1eef0bd02ab40a4d4a2a614d736767cb7fe59e62d53ebb84c83a7908 |
|
MD5 | 3d8f149c729c69225f062f0629f9ffa0 |
|
BLAKE2b-256 | 0f32cccea97dd413a3fe52728d43adfe3c40e9157305b3136e47b65ab4d82b77 |