コード例 #1
0
 def test_menu_item_icon_fontawesome(self):
     menu_item = SettingMenuItem(IconSetting,
                                 icon='fa-suitcase',
                                 classnames='test-class')
     self.assertEqual(menu_item.icon_name, '')
     self.assertEqual(set(menu_item.classnames.split(' ')),
                      {'icon', 'icon-fa-suitcase', 'test-class'})
コード例 #2
0
 def test_menu_item_icon_fontawesome(self):
     menu_item = SettingMenuItem(IconSetting,
                                 icon="fa-suitcase",
                                 classnames="test-class")
     self.assertEqual(menu_item.icon_name, "")
     self.assertEqual(
         set(menu_item.classnames.split(" ")),
         {"icon", "icon-fa-suitcase", "test-class"},
     )
コード例 #3
0
def register_navlinks_menu_item():
    '''
    Generate a second menu button at the root of the Admin sidebar
    '''
    return SettingMenuItem(NavLinks, icon="list-ul")
コード例 #4
0
 def test_menu_item_icon(self):
     menu_item = SettingMenuItem(IconSetting, icon='tag', classnames='test-class')
     classnames = set(menu_item.classnames.split(' '))
     self.assertEqual(classnames, {'icon', 'icon-tag', 'test-class'})
コード例 #5
0
 def test_menu_item_icon(self):
     menu_item = SettingMenuItem(IconSetting,
                                 icon='tag',
                                 classnames='test-class')
     self.assertEqual(menu_item.icon_name, 'tag')
     self.assertEqual(menu_item.classnames, 'test-class')
コード例 #6
0
 def test_menu_item_icon(self):
     menu_item = SettingMenuItem(IconSetting,
                                 icon="tag",
                                 classnames="test-class")
     self.assertEqual(menu_item.icon_name, "tag")
     self.assertEqual(menu_item.classnames, "test-class")