20 lines
719 B
Python
20 lines
719 B
Python
"""Download wrappers must preserve the native starter files byte for byte."""
|
|
import pathlib
|
|
import unittest
|
|
import zipfile
|
|
|
|
ROOT = pathlib.Path(__file__).resolve().parents[1] / "docs/templates/midra-layout"
|
|
|
|
|
|
class MidraTemplateDownloads(unittest.TestCase):
|
|
def test_ai_download_archive_preserves_names_and_original_bytes(self):
|
|
names = {"midra-layout-1080p-2-layers.ai", "midra-layout-4k-2-layers.ai"}
|
|
with zipfile.ZipFile(ROOT / "midra-layout-ai-templates.zip") as archive:
|
|
self.assertEqual(set(archive.namelist()), names)
|
|
for name in names:
|
|
self.assertEqual(archive.read(name), (ROOT / name).read_bytes())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|