Пример #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])