MCPcopy Create free account
hub / github.com/ResearAI/DeepReviewer-v2 / DeepXivAsyncClient

Class DeepXivAsyncClient

tests/test_retrieval_disabled_mode.py:204–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 calls: list[dict] = []
203
204 class DeepXivAsyncClient:
205 def __init__(self, *args, **kwargs):
206 pass
207
208 async def __aenter__(self):
209 return self
210
211 async def __aexit__(self, exc_type, exc, tb):
212 return None
213
214 async def get(self, url, **kwargs):
215 calls.append({'url': url, **kwargs})
216 if str(url).endswith('/stats/usage'):
217 return _json_response(200, {'daily_limit': 1000, 'usage_history': []}, url)
218 return _json_response(
219 200,
220 {
221 'total_count': 1,
222 'result': [
223 {
224 'arxiv_id': '1706.03762',
225 'title': 'Attention Is All You Need',
226 'abstract': 'Transformer abstract',
227 'url': 'https://arxiv.org/pdf/1706.03762.pdf',
228 'date': '2017-06-12T17:57:34Z',
229 'citation_count': 100,
230 'categories': ['cs.CL'],
231 'authors': [{'name': 'Ashish Vaswani', 'orgs': ['Google']}],
232 'score': 0.99,
233 }
234 ],
235 },
236 url,
237 )
238
239 monkeypatch.setattr(paper_search_module.httpx, 'AsyncClient', DeepXivAsyncClient)
240

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected