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-1.0.0.tar.gz (19.1 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-1.0.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: helix_mockserver_client-1.0.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.15

File hashes

Hashes for helix_mockserver_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3e161519d00c7e458d6386ae4d5615505c58d35cc2e098524354c4639be689e9
MD5 06d231c1481bc6ff9f8bef88fe4116cf
BLAKE2b-256 0406d3eb14b78ce6fb41e8d0e1b5777bfe7a464e0c45d49d862208a5f09e4b87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for helix_mockserver_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 704f2c6a06238b9cf7f94f8a9b3e1bce6a8f796f2710e31c5087c475f9b589fe
MD5 afbb7d0be1face699cf73fcc15cf6836
BLAKE2b-256 5c48d2ac3aa633da13f522d42ffc70223a29aded16a7c8627a3232764636b03c

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