Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)
Eve API mocker

Everything is stored in self.items.

Support:
    - All methods except HEAD
    - Handle etags
    - Return good status_code

Not (yet?) supported:(more...)

src/e/v/eve-mocker-0.1.0/test_eve_mocker.py   eve-mocker(Download)
from httpretty import HTTPretty
from sure import expect
from eve_mocker import EveMocker, query_data
from urlparse import urljoin
from functools import partial
    def setUp(self):
        HTTPretty.enable()
        self.eve_mocker = EveMocker(BASE_URL, default_pk="testpk")
 
    def tearDown(self):
    def testContextManager(self):
        """ Test EveMocker within a context manager. """
        with EveMocker("http://myapi.com/api/"):
            response = requests.get("http://myapi.com/api/mymodel")
            expect(response.status_code).to.equal(200)