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.1.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for servicemock-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d10ad6a6e8b7284290355389da76f78ccc0a2f3b91295bf363d6d732c7d2fff |
|
MD5 | d7af0f6f308185db1b54e0ce054b5343 |
|
BLAKE2b-256 | aee956150193059a60cf58d0518de5a98666e2598bc8d4d76c966c5ded2d1561 |