renamed files; implemented command_entry; wrote real test and added test file structure

This commit is contained in:
truePhilipp committed 2024-05-02 21:33:46 +02:00
1 parent 92c7aa8934
commit d08aff8dd1
8 files changed
+82 -27

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import os
import filecmp
import shutil
from unittest import TestCase
from html_to_django import converter
class ConverterTests(TestCase):
def test_convert_file(self):
shutil.copytree(
os.path.abspath("tests/test_project"),
os.path.abspath("tests/test_project_test_result"),
dirs_exist_ok=True
)
converter.convert_file(
os.path.abspath("tests/test_project_test_result/test.html")
)
self.assertTrue(filecmp.cmp(
os.path.abspath("tests/test_project_test_result/test.n.html"),
os.path.abspath("tests/test_project_expected_result/test.n.html")
))