discord-havoc/litterbox_test.py

25 lines
651 B
Python
Raw Normal View History

2025-02-16 13:16:53 -05:00
#!/usr/bin/env python3.12
"""Tests for both Catbox & Litterbox"""
import os
import logging
import asyncio
from typing import Optional
2025-02-16 13:19:41 -05:00
from util.litterbox import LitterboxAsync
from util.catbox import CatboxAsync
2025-02-16 13:16:53 -05:00
logger = logging.getLogger()
logger.setLevel(logging.INFO)
async def test() -> None:
f = os.path.join(os.path.expanduser("~"), "qu.png")
box1: LitterboxAsync = LitterboxAsync()
box2: CatboxAsync = CatboxAsync()
url1: Optional[str] = await box1.upload(f)
url2: Optional[str] = await box2.upload(f)
logging.info("""Uploaded URLs:
Litter - %s\n
Cat - %s""", url1, url2)
asyncio.run(test())