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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c989c54b550b6747f51df9ded7221dddd5f5033c32625cca58045966d03e4a9 |
|
MD5 | b6ac208a6619d6a17e069df0d6cae20a |
|
BLAKE2b-256 | 4d8c57905273f085ce48e90576cdb59c7f6b5161b25230f2cdb81b40f51d2496 |
Close
Hashes for helix_mockserver_client-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae9c54754b84b32cc4d657372d578c4eb3fc0ccc0389626c6cf6e742d599ab8 |
|
MD5 | f134992818764bcf235f5d17801a6dd3 |
|
BLAKE2b-256 | bac52f3bac6c9439d87b6d2cf602325929cafd9f36b67e2e414c86e38ccbb10d |