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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9bbf64495928d2b6e03cb1a40012853e27e416c90889f6c6a33c43301c97321 |
|
MD5 | 60432b7f4b53c3944f6ab77c9ee6ee2b |
|
BLAKE2b-256 | faf4a9bcc2283627bc2cca6189c168a9a5560d4bd2cce1a832376aad5693fac1 |
Close
Hashes for helix_mockserver_client-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 475b204b379bf7c36c3afa84ca84e73d21533d8cb302dc390a76e24c9415ee06 |
|
MD5 | 697d4b2f6a37aacebb4d8fad1060286e |
|
BLAKE2b-256 | 4f154b17689dd7a5071316e911f1047f1a494bf8a0dd1acde9162dc85733eb88 |