fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove ssify.
[wolnelektury.git]
/
src
/
search
/
mock_search.py
diff --git
a/src/search/mock_search.py
b/src/search/mock_search.py
index
3bd7b93
..
6c43040
100644
(file)
--- a/
src/search/mock_search.py
+++ b/
src/search/mock_search.py
@@
-1,8
+1,7
@@
-# -*- coding: utf-8 -*-
# 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 Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from mock import Mock
+from
unittest.
mock import Mock
from catalogue.models import Book, Tag
from random import randint, choice
from catalogue.models import Book, Tag
from random import randint, choice
@@
-36,15
+35,6
@@
class Search(Mock):
results.append(res)
return results
results.append(res)
return results
- # WTF
- def search_books(self, query, filters=None, max_results=10):
- return self._find_some_books(max_results=max_results)
-
def search_everywhere(self, searched, query_terms=None):
return []
def search_everywhere(self, searched, query_terms=None):
return []
- def hint_tags(self, query, pdcounter=True, prefix=True):
- return Tag.objects.exclude(category='set').order_by('?')[:randint(1, 10)]
-
- def hint_books(self, prefix):
- return Book.objects.order_by('?')[:randint(1, 10)]