def test_start_handling_frames_fails_when_using_incorrect_callback(self):
        c = Camera()

        def callback(a, b):
            return

        with self.assertRaises(ValueError):
            c.start_handling_frames(callback)
    def test_start_handling_frames_registers_action_on_frame_handler(self):
        c = Camera()

        def callback(frame):
            return

        c.start_handling_frames(callback)
        self.assertTrue(
            c._frame_handler.is_running_action(CaptureActions.HANDLE_FRAME))
    def test_stop_handling_frames_motion_removes_action_on_frame_handler(self):
        c = Camera()

        def callback(frame):
            return

        c.start_handling_frames(callback)
        c.stop_handling_frames()
        self.assertFalse(
            c._frame_handler.is_running_action(CaptureActions.HANDLE_FRAME))