fix: enable VK image mirroring by default
This commit is contained in:
1 parent
a22d23dcd7
commit
0041e683fe
2 files changed
+5
-1
No files matched your search
@@ -28,7 +28,7 @@ class ImageHostClient:
|
||||
retention: Политика хранения (по умолчанию "forever")
|
||||
timeout: Таймаут HTTP-запросов в секундах
|
||||
"""
|
||||
self.api_url = (api_url or os.getenv("BELKI_IMAGE_HOST_API_URL", "")).rstrip("/")
|
||||
self.api_url = (api_url or os.getenv("BELKI_IMAGE_HOST_API_URL", "https://nyan.nyan404.ru")).rstrip("/")
|
||||
self.retention = retention
|
||||
self.timeout = timeout
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@ from app.belki.image_host import ImageHostClient, ImageHostError
|
||||
|
||||
|
||||
class ImageHostClientTests(unittest.TestCase):
|
||||
def test_default_client_targets_belki_image_host(self) -> None:
|
||||
with patch.dict("os.environ", {}, clear=True):
|
||||
self.assertEqual(ImageHostClient().api_url, "https://nyan.nyan404.ru")
|
||||
|
||||
def test_initiate_identifies_the_belki_client(self) -> None:
|
||||
client = ImageHostClient(api_url="https://api.example.test")
|
||||
response = MagicMock()
|
||||
|
||||
Reference in new issue
Block a user