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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08258dfe7571072f1560b51725387f2e3d0ab9cb12a9492deff8c0f3a36bf86f |
|
MD5 | 9ac7b73d6c545709d98e3766bbdcaa60 |
|
BLAKE2b-256 | 9361d3415a301d1831f7b1bb1b52278ab4852b481d551a4f50fa4572987155bc |
Close
Hashes for helix_mockserver_client-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6616e625a70bb85b59c46141c2a4629ba751d443c70eb08fefbca32fd5efbe97 |
|
MD5 | 8413e8ef492bd5d474af736bf0cde01e |
|
BLAKE2b-256 | e9137ab29b78deab4d3305d69598a21f61f90f2b4ed1a12d3247d8f0a84a0c76 |