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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cca1c53b71d2adb033b7ec7759f761fee8e1b33a13d76415cd2ee32538634483 |
|
MD5 | e7c7809899b669f6336f3308d0076468 |
|
BLAKE2b-256 | 30f04d433bfc7c85d963bdf3a1964658cb690670b9f14b434893ac5227c87bb0 |
Close
Hashes for helix_mockserver_client-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ea3490f754db095c5bec1b86cc1d53c3c35d0082731eadeeb9fe178025d5423 |
|
MD5 | 76ccdff6e69127862cff1f4e482ea501 |
|
BLAKE2b-256 | 2dcf850a29d76dbcbdae61b7705455ef36270b5ac17f3f891ee81042bdc65cf2 |