20 lines
632 B
Python
20 lines
632 B
Python
import unittest
|
|
|
|
from app.vision.storage import format_upload_images_markdown, upload_media_path
|
|
|
|
|
|
class UploadMarkdownTests(unittest.TestCase):
|
|
def test_single_image(self) -> None:
|
|
md = format_upload_images_markdown(5, ["abc.jpg"])
|
|
self.assertIn(upload_media_path(5, "abc.jpg"), md)
|
|
self.assertIn("![скриншот]", md)
|
|
|
|
def test_multiple_images(self) -> None:
|
|
md = format_upload_images_markdown(3, ["a.jpg", "b.jpg"])
|
|
self.assertIn("скриншот 1/2", md)
|
|
self.assertIn("скриншот 2/2", md)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|