fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests back up
[wolnelektury.git]
/
src
/
catalogue
/
test_utils.py
diff --git
a/src/catalogue/test_utils.py
b/src/catalogue/test_utils.py
index
6bc5569
..
af3659f
100644
(file)
--- a/
src/catalogue/test_utils.py
+++ b/
src/catalogue/test_utils.py
@@
-1,5
+1,5
@@
-# This file is part of Wolne
l
ektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja
Nowoczesna Polska
. See NOTICE for more information.
+# This file is part of Wolne
L
ektury, 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
#
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_'),
@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'},
},
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):
"""
)
class WLTestCase(TestCase):
"""
@@
-39,10
+38,13
@@
class PersonStub:
class BookInfoStub:
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',
# allow single definition for multiple-value fields
_salias = {
'authors': 'author',
+ 'genres': 'genre',
+ 'epochs': 'epoch',
+ 'kinds': 'kind',
}
def __init__(self, **kwargs):
}
def __init__(self, **kwargs):
@@
-74,7
+76,7
@@
def info_args(title, language=None):
language = 'pol'
return {
'title': str(title),
language = 'pol'
return {
'title': str(title),
- 'url': WLURI
.from_slug
(slug),
+ 'url': WLURI(slug),
'about': "http://wolnelektury.pl/example/URI/%s" % slug,
'language': language,
}
'about': "http://wolnelektury.pl/example/URI/%s" % slug,
'language': language,
}