Edumed import from pad + auto tagging
[redakcja.git] / apps / catalogue / tests / edumed.py
1 # -*- coding: utf-8 -*-
2 #
3 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
4 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 #
6 """Tests for the publishing process."""
7
8 from catalogue.test_utils import get_fixture
9
10 from mock import patch
11 from django.test import TestCase
12 from django.contrib.auth.models import User
13 from catalogue.models import Book
14 from catalogue.management import edumed
15
16 import logging
17 south_logger=logging.getLogger('south')
18 south_logger.setLevel(logging.INFO)
19
20
21 class EduMedTests(TestCase):
22     def setUp(self):
23         self.text1 = get_fixture('gim_3.1.txt')
24
25     def test_autotag(self):
26         lines = edumed.tagger(self.text1)
27         for l in lines:
28             print "| %s" % l