Move HTML from the old transform sheet.
[librarian.git] / tests / test_html_transform_abstrakt.py
1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 import unittest
5 from librarian.document import WLDocument
6 from librarian.builders.html import AbstraktHtmlBuilder
7 from .utils import get_fixture
8
9
10 class AbstractTests(unittest.TestCase):
11     def test_abstrakt(self):
12         builder = AbstraktHtmlBuilder()
13         got = builder.build(
14             WLDocument(
15                 filename=get_fixture('text', 'abstrakt.xml'),
16             )
17         ).get_bytes().decode('utf-8')
18         with open(get_fixture('text', 'abstrakt.expected.html')) as f:
19             expected = f.read()
20         self.assertEqual(expected, got)