diff --git a/tests/test_api.py b/tests/test_api.py index fcbf5b1..5df47ee 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -20,6 +20,14 @@ def test_unresolvable_agent(self): def test_missing_agent(self): + if self.mock: + resp = self._prepare_response(self.responses['generic_404_page'], 404, False) + LOGGER.debug(resp) + self.jc.session.request = Mock(return_value=resp) + resp_data = self.jc.execute(**self.requests['valid_exec']) + LOGGER.debug(resp_data) + else: + resp_data = self.jc.execute(**self.requests['valid_exec']) self.jc = JolokiaClient('http://google.com') kwargs = {'mbean': 'java.lang:Memory', 'attribute': 'HeapMemoryUsage'} resp = self.jc.get_attribute(**kwargs)