def test_configure_laser_detector2_should_replace_the_laser_detector_on_the_video_processor_with_new_laser_detector(self, mock_camera): cam = mock_camera.return_value cam.shape = [300, 100] api = ScannerAPI() api.configure_laser_detector2(255, 'red') self.assertNotEquals(api._default_laser_detector, api.video_processor.laser_detector) self.assertEquals(api.laser_detector, api.video_processor.laser_detector)
def test_configure_laser_detector_should_create_an_laser_detector_with_the_given_config(self, mock_camera): cam = mock_camera.return_value cam.shape = [300, 100] api = ScannerAPI() api.configure_laser_detector2(255, 'red') self.assertEquals(255, api.laser_detector.threshold) self.assertEquals('red', api.laser_detector.color)
def test_configure_laser_detector_should_create_an_laser_detector_with_the_given_config( self, mock_camera): cam = mock_camera.return_value cam.shape = [300, 100] api = ScannerAPI() api.configure_laser_detector2(255, 'red') self.assertEquals(255, api.laser_detector.threshold) self.assertEquals('red', api.laser_detector.color)
def test_configure_laser_detector2_should_replace_the_existing_laser_detector_with_new_laser_detector(self, mock_camera): cam = mock_camera.return_value cam.shape = [300, 100] api = ScannerAPI() api.configure_laser_detector2(255, 'red') initial = api.laser_detector api.configure_laser_detector2(225, 'blue') self.assertNotEquals(api.laser_detector, initial)
def test_configure_laser_detector2_should_replace_the_existing_laser_detector_with_new_laser_detector( self, mock_camera): cam = mock_camera.return_value cam.shape = [300, 100] api = ScannerAPI() api.configure_laser_detector2(255, 'red') initial = api.laser_detector api.configure_laser_detector2(225, 'blue') self.assertNotEquals(api.laser_detector, initial)
def test_configure_laser_detector2_should_replace_the_laser_detector_on_the_video_processor_with_new_laser_detector( self, mock_camera): cam = mock_camera.return_value cam.shape = [300, 100] api = ScannerAPI() api.configure_laser_detector2(255, 'red') self.assertNotEquals(api._default_laser_detector, api.video_processor.laser_detector) self.assertEquals(api.laser_detector, api.video_processor.laser_detector)