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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f176c3623f3d76f4596a2690e618a7805e7a68e6d280f8eb02008897a6e9553 |
|
MD5 | ee5aa69b7d92b2f190165408577d5e0c |
|
BLAKE2b-256 | 31ed82842ba5cf0fdab2b07a9b5d919674fcda45bf2cbc5b547d23ed6a1c6dc9 |
Close
Hashes for helix_mockserver_client-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b06276a9494eaec2bfc4b4592e131af0e5b4ac3f56990abb3f1b5e32b574fbc4 |
|
MD5 | fa8189d60fc62e6bf679822f41524263 |
|
BLAKE2b-256 | 602ff51780c1d69714c37afb092f13f7c994f68c890fbf3161b489cd20425514 |