Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helix_mockserver_client-2.0.7.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helix_mockserver_client-2.0.7-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file helix_mockserver_client-2.0.7.tar.gz.

File metadata

  • Download URL: helix_mockserver_client-2.0.7.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for helix_mockserver_client-2.0.7.tar.gz
Algorithm Hash digest
SHA256 f87f5c87a60e750d32c637bf9041e6718e922a09a40fbe89f7c25ea06b32341d
MD5 28965160e89d9018a88d04d36de0535b
BLAKE2b-256 28b52212df15436ccb6b79fb8a9f97c9e9804a47892e047bf85cdcc373239673

See more details on using hashes here.

File details

Details for the file helix_mockserver_client-2.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for helix_mockserver_client-2.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7827e7f60d368b9ac5670f533661688a22d422bc104389e0754d26f80e43858d
MD5 510f940d9f41443ed589b5374d07a77a
BLAKE2b-256 578e49174c5f7e4298256d3257e3aa57cd3603b04e751af610cdab7f2f72c4f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page