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
File details
Details for the file helix_mockserver_client-2.0.1.tar.gz
.
File metadata
- Download URL: helix_mockserver_client-2.0.1.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5eb7fd76e9eb57548f009dbf31454780374afbdbf35cdd22f41dff84bd1b04d |
|
MD5 | 6101f00f3a63c4a014273ca62de20834 |
|
BLAKE2b-256 | e6c39e44a24ef250ae21e3061790da040f20f5c095100a0c80090f572cd28782 |
File details
Details for the file helix_mockserver_client-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: helix_mockserver_client-2.0.1-py3-none-any.whl
- Upload date:
- Size: 41.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c598556da8e0193241160a051abb7a2be970c516ad4286a61d419d6801f8c484 |
|
MD5 | 52a014b2261f3157e8f83880a11dd348 |
|
BLAKE2b-256 | 621533db5fb53f9e648f6e87f796fb28c11267582689bf8a4628dd35739493df |