fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#3208 + raphael.js
[wolnelektury.git]
/
apps
/
catalogue
/
tests
/
tags.py
diff --git
a/apps/catalogue/tests/tags.py
b/apps/catalogue/tests/tags.py
index
3eab3da
..
2608eb6
100644
(file)
--- a/
apps/catalogue/tests/tags.py
+++ b/
apps/catalogue/tests/tags.py
@@
-277,12
+277,11
@@
class BookTagsTests(WLTestCase):
self.assertEqual([(tag.name, tag.count) for tag in related_themes],
[('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)])
self.assertEqual([(tag.name, tag.count) for tag in related_themes],
[('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)])
- def test_
main_pag
e_tags(self):
+ def test_
catalogu
e_tags(self):
""" test main page tags and counts """
""" test main page tags and counts """
- from catalogue.templatetags.catalogue_tags import catalogue_menu
- menu = catalogue_menu()
- self.assertEqual([(tag.name, tag.book_count) for tag in menu['author']],
+ context = self.client.get('/katalog/').context
+ self.assertEqual([(tag.name, tag.book_count) for tag in context['categories']['author']],
[('Jim Lazy', 1), ('Common Man', 1)])
[('Jim Lazy', 1), ('Common Man', 1)])
- self.assertEqual([(tag.name, tag.book_count) for tag in
menu
['theme']],
+ self.assertEqual([(tag.name, tag.book_count) for tag in
context['categories']
['theme']],
[('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)])
[('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)])