X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8952b9530d943655e552ea660c47e850123c5105..e1e0bdc6aed0ca388dd1c8da7a0721beb0f1a2e4:/src/catalogue/test_utils.py diff --git a/src/catalogue/test_utils.py b/src/catalogue/test_utils.py index 6bc5569c6..af3659f40 100644 --- a/src/catalogue/test_utils.py +++ b/src/catalogue/test_utils.py @@ -1,5 +1,5 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from os.path import abspath, dirname, join import tempfile @@ -13,13 +13,12 @@ from librarian import WLURI @override_settings( MEDIA_ROOT=tempfile.mkdtemp(prefix='djangotest_'), - CATALOGUE_DONT_BUILD={'pdf', 'mobi', 'epub', 'txt', 'fb2', 'cover'}, + CATALOGUE_DONT_BUILD={'pdf', 'mobi', 'epub', 'txt', 'fb2', 'cover', 'html_nonotes', 'references'}, NO_SEARCH_INDEX=True, CELERY_TASK_ALWAYS_EAGER=True, CACHES={ 'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}, }, - SOLR=settings.SOLR_TEST, ) class WLTestCase(TestCase): """ @@ -39,10 +38,13 @@ class PersonStub: class BookInfoStub: - _empty_fields = ['cover_url', 'variant_of'] + _empty_fields = ['cover_url', 'variant_of', 'license'] # allow single definition for multiple-value fields _salias = { 'authors': 'author', + 'genres': 'genre', + 'epochs': 'epoch', + 'kinds': 'kind', } def __init__(self, **kwargs): @@ -74,7 +76,7 @@ def info_args(title, language=None): language = 'pol' return { 'title': str(title), - 'url': WLURI.from_slug(slug), + 'url': WLURI(slug), 'about': "http://wolnelektury.pl/example/URI/%s" % slug, 'language': language, }