def test_makes_curb_api_request(self, curb_api_mock, sessions_mock):
   sessions_mock.__next__ = mock.Mock(return_value = 'session_id')
   get_response('endpoint_with_session')
   curb_api_mock.assert_called_with('endpoint_with_session', {'session': 'session_id'})
 def test_dict_response(self, curb_api_mock, sessions_mock):
   sessions_mock.__next__ = mock.Mock(return_value = 'session_id')
   assert type(get_response('endpoint_with_session')) == dict
 def test_returned_value(self, curb_api_mock, sessions_mock):
   sessions_mock.__next__ = mock.Mock(return_value = 'session_id')
   assert get_response('endpoint_with_session') == {'any': 'Response'}