Files
wehub-resource-sync 9a6da7d40d
Publish Docker image / Build and publish (push) Failing after 0s
CI / Python tests (push) Failing after 4s
chore: import upstream snapshot with attribution
2026-07-13 12:03:55 +08:00

23 lines
678 B
Python

import sys
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
from app.models.schema import VideoAspect
class TestVideoAspect(unittest.TestCase):
def test_to_resolution_known_aspects(self):
self.assertEqual(VideoAspect.landscape.to_resolution(), (1920, 1080))
self.assertEqual(VideoAspect.portrait.to_resolution(), (1080, 1920))
self.assertEqual(VideoAspect.square.to_resolution(), (1080, 1080))
def test_to_resolution_rejects_unsupported_value(self):
with self.assertRaises(ValueError):
VideoAspect.to_resolution("4:5")
if __name__ == "__main__":
unittest.main()