Mock DSL for requests_mock
Project description
Servicemock
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
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
servicemock-0.1.0.tar.gz
(6.4 kB
view hashes)
Built Distributions
servicemock-0.1.0-py3.8.egg
(21.9 kB
view hashes)
Close
Hashes for servicemock-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c6a4beb2839f8b3945627e54c56e597118d90507afb9e8a78259be85de13076 |
|
MD5 | f71022674fd6cf9f11601ade94b47ebb |
|
BLAKE2b-256 | 8b00487edd4561c1df725d9dd9d5d666aa4e62239e6058df4cab099e1e8f5aab |