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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc4b2203335c4564f7fdd3984f63bdf4f45cf4ad62870a9f5305ad420aded135 |
|
MD5 | a0f50626415c9d05638368507911ee72 |
|
BLAKE2b-256 | f6634375eeda0023adb2febfbb2590a6d9f8afad3fa4852b2269b6d75b77ea28 |
Close
Hashes for helix_mockserver_client-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1cc0ff4efac09fd4d1ed0bdf1b446d2901e44cc58168a52b527832023f73fb5 |
|
MD5 | 3349f0b14db9e3ba6519b2a77bf64595 |
|
BLAKE2b-256 | 543dbc5491a8e2625e868a073cd9807c7700a6e6a5e47177d139577de6b6ba49 |