X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/d1037d617d8cd2cafc60e67ac0272f86d2e24dfa..3f24ff6b4246a5206555952f6e6c53f6ed5231d8:/tests/test_epub.py diff --git a/tests/test_epub.py b/tests/test_epub.py deleted file mode 100644 index faa76e7..0000000 --- a/tests/test_epub.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# -# This file is part of Librarian, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from zipfile import ZipFile -from lxml import html -from nose.tools import * -from librarian import DirDocProvider -from librarian.parser import WLDocument -from tests.utils import get_fixture - - -def test_transform(): - epub = WLDocument.from_file( - get_fixture('text', 'asnyk_zbior.xml'), - provider=DirDocProvider(get_fixture('text', '')) - ).as_epub(flags=['without_fonts']).get_file() - zipf = ZipFile(epub) - - # Check contributor list. - last = zipf.open('OPS/last.html') - tree = html.parse(last) - editors_attribution = False - for par in tree.findall("//p"): - if par.text.startswith(u'Opracowanie redakcyjne i przypisy:'): - editors_attribution = True - assert_equal(par.text.rstrip(), - u'Opracowanie redakcyjne i przypisy: ' - u'Adam Fikcyjny, Aleksandra Sekuła, Olga Sutkowska.') - assert_true(editors_attribution)