1 # -*- coding: utf-8 -*-
3 # Copyright © 2008,2009,2010 Fundacja Nowoczesna Polska
5 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
6 # For full license text see COPYING or <http://www.gnu.org/licenses/agpl.html>
8 from librarian import html, NoDublinCore
9 from nose.tools import *
10 from utils import get_fixture, remove_output_file
12 def teardown_transform():
13 remove_output_file('text', 'asnyk_miedzy_nami.html')
16 @with_setup(None, teardown_transform)
18 output_file_path = get_fixture('text', 'asnyk_miedzy_nami.html')
19 expected_output_file_path = get_fixture('text', 'asnyk_miedzy_nami_expected.html')
22 get_fixture('text', 'asnyk_miedzy_nami.xml'),
26 assert_equal(file(output_file_path).read(), file(expected_output_file_path).read())
29 @with_setup(None, teardown_transform)
31 def test_no_dublincore():
33 get_fixture('text', 'asnyk_miedzy_nami_nodc.xml'),
34 get_fixture('text', 'asnyk_miedzy_nami_nodc.html'),
38 @with_setup(None, teardown_transform)
39 def test_passing_parse_dublincore_to_transform():
40 """Passing parse_dublincore=False to transform omits DublinCore parsing."""
42 get_fixture('text', 'asnyk_miedzy_nami_nodc.xml'),
43 get_fixture('text', 'asnyk_miedzy_nami.html'),
44 parse_dublincore=False,