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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c2be84de38c2957a71dd71389d1a11b98254d678550d680a545e4fbc3e28be6 |
|
MD5 | 4ae3b61ceafd188b02e9a28b2f317ae1 |
|
BLAKE2b-256 | 4300ed8f268210732e3ea0aed3f55c460d2e3b20311fac7c013698bc39f4af95 |
Close
Hashes for helix_mockserver_client-1.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09c3fee7c408a7058dae3a2f813cd43a3a32a65b67d72c7678f70aa4eae68382 |
|
MD5 | 34816632017582c9c67439787fb7185b |
|
BLAKE2b-256 | e5a4b9236271a29bfac15708b03e5ae317293bb3789d8e3e9f726345b9c7d935 |