示例#1
0
 def test_panels_should_be_a_list(self):
     with self.assertRaises(ValueError):
         check_settings({
             'test': {
                 'name': 'Test',
                 'panels': 1
             }
         })
示例#2
0
 def test_required_panels_for_item(self):
     with self.assertRaises(ValueError):
         check_settings(
             {
                 'test': {
                     'name': 'Test',
                 }
             }
         )
示例#3
0
 def test_required_name_for_item(self):
     with self.assertRaises(ValueError):
         check_settings(
             {
                 'test': {
                     'panels': []
                 }
             }
         )
示例#4
0
 def test_wrong_item_of_categories(self):
     with self.assertRaises(ValueError):
         check_settings({'test': []})
示例#5
0
 def test_wrong_type(self):
     with self.assertRaises(ValueError):
         check_settings([1, 2, 3])