X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/4e329824f40367945de11d3647396859092f5c2c..b1376392167c09775bf57b41cb9ea3016f06cfb8:/tests/test_mobi.py?ds=sidebyside diff --git a/tests/test_mobi.py b/tests/test_mobi.py index 3b29e72..b96513e 100644 --- a/tests/test_mobi.py +++ b/tests/test_mobi.py @@ -1,20 +1,20 @@ -# -*- coding: utf-8 -*- -# # This file is part of Librarian, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # -from __future__ import unicode_literals - +import unittest from zipfile import ZipFile from lxml import html -from nose.tools import * from librarian import DirDocProvider -from librarian.parser import WLDocument +from librarian.builders import MobiBuilder +from librarian.document import WLDocument from tests.utils import get_fixture -def test_transform(): - mobi = WLDocument.from_file( - get_fixture('text', 'asnyk_zbior.xml'), - provider=DirDocProvider(get_fixture('text', '')) - ).as_mobi(converter_path='true').get_file() +class MobiTests(unittest.TestCase): + def test_transform(self): + mobi = MobiBuilder().build( + WLDocument( + get_fixture('text', 'asnyk_zbior.xml'), + provider=DirDocProvider(get_fixture('text', '')) + ) + )