Пример #1
0
 def test_check_group_as_list(self):
     check_group = CheckGroup(
         name='check group',
         checks=[
             Check(name='check 1', path='check_1'),
             Check(name='check 2', path='check_2')
         ]
     )
     [self.assertEqual(type(c), Check) for c in check_group.as_list()]
Пример #2
0
 def test_check_group_raises_exception_due_to_missing_id(self):
     check_group = CheckGroup(checks=[Check(name='check', path='check.py')])
     check_group.update_status({'status': Check.STATUS['OK']})
Пример #3
0
 def test_check_does_not_get_updated(self):
     check = Check(name='check 1', path='check_1')
     check_group = CheckGroup(name='check group', checks=[check])
     updated = check_group.update_status({'id': check.id + 1, 'status': Check.STATUS['OK']})
     self.assertEqual(updated, False)
Пример #4
0
 def test_check_group_raises_exception_due_to_missing_status(self):
     check = Check(name='check', path='check.py')
     check_group = CheckGroup(checks=[check])
     check_group.update_status({'id': check.id})