Skip to main content

Mock DSL for requests_mock

Project description

Servicemock

Build Status

Unittest example

import unittest
import servicemock as sm


class TestService(sm.ServiceMockTestCase):

    def test(self):
        # If the expected request is not made the test will fail
        sm.expect('http://service.com').to_receive(sm.Request('GET', '/v1/users')).and_responds(sm.HTTP200Ok(sm.JSON({'status': 'ok'})))

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

servicemock-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

servicemock-0.1.1-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file servicemock-0.1.1.tar.gz.

File metadata

  • Download URL: servicemock-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for servicemock-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c4984701e01580221b250e13fde8793a9a74e4f13c5da62131e7bbd3b61e9728
MD5 18936299d426502194aaa59a1f993723
BLAKE2b-256 97faf6d6196b5f3d8730112238620060ecca77faea32c15a469112714048698c

See more details on using hashes here.

File details

Details for the file servicemock-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: servicemock-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for servicemock-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d10ad6a6e8b7284290355389da76f78ccc0a2f3b91295bf363d6d732c7d2fff
MD5 d7af0f6f308185db1b54e0ce054b5343
BLAKE2b-256 aee956150193059a60cf58d0518de5a98666e2598bc8d4d76c966c5ded2d1561

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