@httpretty.activate
    @data(GET, POST)
    def test_with_404_status_and_invalid_json(self, method):
        self._register_uri(method, body="Invalid JSON", status=404)
        with self.assertRaises(trovebox.Trovebox404Error):
            GetOrPost(self.client, method).call(self.test_endpoint)
Check that invalid JSON causes the get/post methods to raise
dataset/ETHPy150Open photo/openphoto-python/tests/unit/test_http_errors.py/TestHttpErrors.test_with_404_status_and_invalid_json