@pytest.mark.django_db
def test_page_links_plugin_show_all():
 context = get_jinja_context()
 page = create_page(eternal=True, visible_in_menu=True)
 plugin = PageLinksPlugin({'show_all_pages': False})
 assert (not plugin.get_context_data(context)['pages'])
 plugin = PageLinksPlugin({'show_all_pages': True})
 assert (page in plugin.get_context_data(context)['pages'])

@ pytest . mark . django_db def test_page_links_plugin_show_all ( ) : context = get_jinja_context ( ) page = create_page ( eternal = True , visible_in_menu = True ) plugin = PageLinksPlugin ( { 'show_all_pages' : False } ) assert ( not plugin . get_context_data ( context ) [ 'pages' ] ) plugin = PageLinksPlugin ( { 'show_all_pages' : True } ) assert ( page in plugin . get_context_data ( context ) [ 'pages' ] )
test that show_all_pages forces plugin to return all visible pages .