1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
5 from unittest import TestCase
6 from librarian.builders import builders
7 from librarian.document import WLDocument
8 from .utils import get_fixture
11 class TransformTest(TestCase):
14 def test_transform(self):
15 expected_output_file_path = get_fixture('text', 'asnyk_miedzy_nami_expected.html')
17 filename=get_fixture('text', 'miedzy-nami-nic-nie-bylo.xml')
18 ).build(builders['html']).get_bytes().decode('utf-8')
20 with open(expected_output_file_path) as f:
21 self.assertEqual(html, f.read())
26 filename=io.BytesIO(b'<utwor />'),
27 ).build(builders['html'], base_url='/')