Mock requests
The new method adds a cleaner mechanism to mock requests in test cases. The URL, expected response and status code can be specified in the test_cases
dictionary, so there is no need to add custom code.
Also, mocking can be disabled by setting senpy.testing.MOCK_REQUESTS
to False, or setting the MOCK_REQUESTS
environment variable to no or false.
As an example, check out The sentiment140 plugin