1 # -*- coding: utf-8 -*-
2 from librarian import text, NoDublinCore
3 from nose.tools import *
4 from utils import get_fixture, remove_output_file
7 def teardown_transform():
8 remove_output_file('text', 'asnyk_miedzy_nami.txt')
11 @with_setup(None, teardown_transform)
13 output_file_path = get_fixture('text', 'asnyk_miedzy_nami.txt')
14 expected_output_file_path = get_fixture('text', 'asnyk_miedzy_nami_expected.txt')
17 get_fixture('text', 'asnyk_miedzy_nami.xml'),
21 assert_equal(file(output_file_path).read(), file(expected_output_file_path).read())
24 @with_setup(None, teardown_transform)
26 def test_no_dublincore():
28 get_fixture('text', 'asnyk_miedzy_nami_nodc.xml'),
29 get_fixture('text', 'asnyk_miedzy_nami_nodc.txt'),
33 @with_setup(None, teardown_transform)
34 def test_passing_parse_dublincore_to_transform():
35 """Passing parse_dublincore=False to transform omits DublinCore parsing."""
37 get_fixture('text', 'asnyk_miedzy_nami_nodc.xml'),
38 get_fixture('text', 'asnyk_miedzy_nami.txt'),
39 parse_dublincore=False,