def test_start_detecting_motion_fails_when_using_incorrect_callback(self): c = Camera() def callback(a, b): return with self.assertRaises(ValueError): c.start_detecting_motion(callback)
def test_start_detecting_motion_registers_action_on_frame_handler(self): c = Camera() def callback(frame): return c.start_detecting_motion(callback) self.assertTrue( c._frame_handler.is_running_action(CaptureActions.DETECT_MOTION))