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