Exemplo n.º 1
0
 def test_menu_tag_accepts_keywords_to_highlight_a_view(self):
     view = 'dashboard.views.compare_v2'
     context = menu_tag(view)
     for item in context['menu']:
         if item['view'] == view:
             self.assertTrue(item['active'])
Exemplo n.º 2
0
 def test_menu_tag_returns_array_of_dicts_that_store_view_name_and_active_status(self):
     context = menu_tag()
     for item in context['menu']:
         self.assertIsInstance(item['view'], str)
         self.assertIsInstance(item['name'], str)
         self.assertIsInstance(item['active'], bool)
Exemplo n.º 3
0
 def test_menu_tag_send_search_form_to_context(self):
     context = menu_tag()
     self.assertIsInstance(context['search_form'], SearchForm)