Initialize system repository: agents, infra, and configuration

This commit is contained in:
2026-04-19 04:51:17 +00:00
parent b861f385e9
commit 0cb48b94e2
23 changed files with 1960 additions and 39 deletions

24
tests/test_esi.py Normal file
View File

@@ -0,0 +1,24 @@
import asyncio
from src.clients.esi import ESIClient
import logging
async def test_esi():
esi = ESIClient()
try:
# Test 1: Fetch a known TypeID (e.g., Condor = 603)
print("Testing ESI: Fetching Condor (TypeID 603)...")
condor = await esi.get_type_details(603)
print(f"Success: Found {condor.get('name')}")
# Test 2: Rate Limit Test (Fetch 5 types rapidly)
print("\nTesting Rate Limiter: Fetching 5 items...")
tasks = [esi.get_type_details(603 + i) for i in range(5)]
results = await asyncio.gather(*tasks)
for res in results:
print(f" - Fetched: {res.get('name')}")
finally:
await esi.close()
if __name__ == "__main__":
asyncio.run(test_esi())

28
tests/test_mediawiki.py Normal file
View File

@@ -0,0 +1,28 @@
import asyncio
from src.clients.mediawiki import MediaWikiClient
import logging
async def test_mediawiki():
mw = MediaWikiClient()
try:
# Test 1: Fetch a known page (e.g., "Condor")
print("Testing MediaWiki: Fetching Condor page...")
content = await mw.get_page_wikitext("Condor")
if content:
print(f"Success: Fetched {len(content)} characters of wikitext.")
print(f"Preview: {content[:100]}...")
else:
print("Failed: Page not found.")
# Test 2: List members of a category
print("\nTesting Category Members: Fetching 'Frigates'...")
members = await mw.get_category_members("Frigates")
print(f"Success: Found {len(members)} pages in Category:Frigates.")
for member in members[:5]:
print(f" - Page: {member}")
finally:
await mw.close()
if __name__ == "__main__":
asyncio.run(test_mediawiki())