Exemplo n.º 1
0
 def test_by_statement(self):
     data = [
         ([  ('a', u'Trois contes de No\u0308el'),
             ('c', u'[par] Madame Georges Renard,'),
             ('c', u'edited by F. Th. Meylan ...')],
             {'title': u'Trois contes de No\u0308el', 'by_statement': '[par] Madame Georges Renard, edited by F. Th. Meylan ...'})
     ]
     for (value, expect) in data:
         output = read_title(MockRecord('245', value))
         self.assertEqual(expect, output)
Exemplo n.º 2
0
 def test_by_statement(self):
     data = [
         ([  ('a', u'Trois contes de No\u0308el'),
             ('c', u'[par] Madame Georges Renard,'),
             ('c', u'edited by F. Th. Meylan ...')],
             {'title': u'Trois contes de No\u0308el', 'by_statement': '[par] Madame Georges Renard, edited by F. Th. Meylan ...'})
     ]
     for (value, expect) in data:
         output = read_title(MockRecord('245', value))
         self.assertEqual(expect, output)
Exemplo n.º 3
0
    def test_read_title(self):
        data = [
            ([  ('a', 'Railroad construction.'),
                ('b', 'Theory and practice.'),
                ('b', 'A textbook for the use of students in colleges and technical schools.')],
                {'title': 'Railroad construction',
                # TODO: Investigate whether this colon between subtitles is spaced correctly
                 'subtitle': 'Theory and practice : A textbook for the use of students in colleges and technical schools'})
        ]

        for (value, expect) in data:
            output = read_title(MockRecord('245', value))
            self.assertEqual(expect, output)
Exemplo n.º 4
0
    def test_read_title(self):
        data = [
            ([  ('a', 'Railroad construction.'),
                ('b', 'Theory and practice.'),
                ('b', 'A textbook for the use of students in colleges and technical schools.')],
                {'title': 'Railroad construction',
                # TODO: Investigate whether this colon between subtitles is spaced correctly
                 'subtitle': 'Theory and practice : A textbook for the use of students in colleges and technical schools'})
        ]

        for (value, expect) in data:
            output = read_title(MockRecord('245', value))
            self.assertEqual(expect, output)