1 # -*- coding: utf-8 -*-
3 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
4 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from __future__ import unicode_literals
9 from tempfile import NamedTemporaryFile
10 from nose.tools import *
11 from librarian import DirDocProvider
12 from librarian.parser import WLDocument
13 from .utils import get_fixture
17 temp = NamedTemporaryFile(delete=False)
20 get_fixture('text', 'asnyk_zbior.xml'),
21 provider=DirDocProvider(get_fixture('text', ''))
22 ).as_pdf(save_tex=temp.name)
23 tex = open(temp.name, 'rb').read().decode('utf-8')
25 # Check contributor list.
26 editors = re.search(r'\\def\\editors\{Opracowanie redakcyjne i przypisy: ([^}]*?)\.\s*\}', tex)
27 assert_equal(editors.group(1), u"Adam Fikcyjny, Aleksandra Sekuła, Olga Sutkowska")