Add test for on_site filter

This commit is contained in:
Iacopo Spalletti 2016-04-26 19:33:10 +02:00
parent 3f2eb3f83d
commit 5883132b40
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6

View file

@ -70,6 +70,10 @@ class ViewTest(BaseTest):
self.assertContains(response, context['post_list'][0].get_absolute_url())
self.assertEqual(getattr(request, BLOG_CURRENT_NAMESPACE), self.app_config_1)
posts[1].sites.add(self.site_2)
self.assertTrue(view_obj.get_queryset().count(), 2)
self.assertFalse(posts[1] in view_obj.get_queryset())
with smart_override('it'):
request = self.get_page_request(pages[1], self.user, lang='it', edit=True)
view_obj = PostListView()