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.
7 from tempfile import NamedTemporaryFile
8 from nose.tools import *
9 from librarian import DirDocProvider
10 from librarian.parser import WLDocument
11 from utils import get_fixture
15 temp = NamedTemporaryFile(delete=False)
18 get_fixture('text', 'asnyk_zbior.xml'),
19 provider=DirDocProvider(get_fixture('text', ''))
20 ).as_pdf(save_tex=temp.name)
21 tex = open(temp.name).read().decode('utf-8')
24 # Check contributor list.
25 editors = re.search(ur'\\def\\editors\{'
26 ur'Opracowanie redakcyjne i przypisy: ([^}]*?)\.\s*\}', tex)
27 assert_equal(editors.group(1),
28 u"Adam Fikcyjny, Aleksandra Sekuła, Olga Sutkowska")