def test_get_calls_requests(self):
        with patch('requests.get') as requests_mock, \
                response_context() as response_mock:
            requests_mock.return_value = response_mock

            request = JsonApiRequest('http://www.example.com', 'admin', 's3cr3t')
            data = request.get('ham/eggs')

            requests_mock.assert_called_with(
                'http://www.example.com/api/ham/eggs',
                headers={'Accept': 'application/json'},
                auth=('admin', 's3cr3t'))
            self.assertEqual(data, {'spam': True})
JsonApiRequest.get should call requests.get and return the JSON result
dataset/ETHPy150Open dimagi/commcare-hq/custom/dhis2/tests.py/JsonApiRequestTest.test_get_calls_requests