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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61ec1387da9af8d2c98995e28ce930cffc13db54df61b69708d8b7ad9af0f499 |
|
MD5 | 9b0562dea7c49c3671d9b10d34ea6265 |
|
BLAKE2b-256 | ebb8ed1b8b25ae2a1c1d734441c4a0556aac09272a293acc74816dceb49baa61 |
Close
Hashes for helix_mockserver_client-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0ce4edb0443c385a15e17b09c0265f5d8e8bba38a03ebae2b6261c43c4a243 |
|
MD5 | 01993c7bc44697c67a1cd23801db6602 |
|
BLAKE2b-256 | ebdbf3d21a809ab1f3e88da24f687682c959af0f2a0748026d223feafca1b101 |