def setup_method(self, method): """Set up the mock camera.""" self.nvr = mock.MagicMock() self.uuid = "uuid" self.name = "name" self.password = "******" self.uvc = uvc.UnifiVideoCamera(self.nvr, self.uuid, self.name, self.password) self.nvr.get_camera.return_value = { "model": "UVC Fake", "recordingSettings": {"fullTimeRecordEnabled": True}, "host": "host-a", "internalHost": "host-b", "username": "******", "channels": [ { "id": "0", "width": 1920, "height": 1080, "fps": 25, "bitrate": 6000000, "isRtspEnabled": True, "rtspUris": ["rtsp://host-a:7447/uuid_rtspchannel_0"], }, { "id": "1", "width": 1024, "height": 576, "fps": 15, "bitrate": 1200000, "isRtspEnabled": False, "rtspUris": ["rtsp://host-a:7447/uuid_rtspchannel_1"], }, ], } self.nvr.server_version = (3, 2, 0)
def setup_method(self, method): """Set up the mock camera.""" self.nvr = mock.MagicMock() self.uuid = 'uuid' self.name = 'name' self.password = '******' self.uvc = uvc.UnifiVideoCamera(self.nvr, self.uuid, self.name, self.password) self.nvr.get_camera.return_value = { 'model': 'UVC Fake', 'recordingSettings': { 'fullTimeRecordEnabled': True, }, 'host': 'host-a', 'internalHost': 'host-b', 'username': '******', } self.nvr.server_version = (3, 2, 0)
def setup_method(self, method): """Set up the mock camera.""" self.nvr = mock.MagicMock() self.uuid = "uuid" self.name = "name" self.password = "******" self.uvc = uvc.UnifiVideoCamera(self.nvr, self.uuid, self.name, self.password) self.nvr.get_camera.return_value = { "model": "UVC Fake", "recordingSettings": { "fullTimeRecordEnabled": True }, "host": "host-a", "internalHost": "host-b", "username": "******", } self.nvr.server_version = (3, 2, 0)