def getJobWhiteboard(self): """Get the whiteboard for the show @rtype: NestedGroup @return: gRPC NestedGroup whiteboard for the show """ response = self.stub.GetJobWhiteboard( show_pb2.ShowGetJobWhiteboardRequest(show=self.data), timeout=Cuebot.Timeout) return response.whiteboard
def testGetJobWhiteboard(self, getStubMock): stubMock = mock.Mock() stubMock.GetJobWhiteboard.return_value = show_pb2.ShowGetJobWhiteboardResponse( whiteboard=job_pb2.NestedGroup(name=TEST_GROUP_NAME, department=TEST_GROUP_DEPT)) getStubMock.return_value = stubMock show = opencue.wrappers.show.Show(show_pb2.Show(name=TEST_SHOW_NAME)) whiteboard = show.getJobWhiteboard() stubMock.GetJobWhiteboard.assert_called_with( show_pb2.ShowGetJobWhiteboardRequest(show=show.data), timeout=mock.ANY) self.assertEqual(whiteboard.name, TEST_GROUP_NAME) self.assertEqual(whiteboard.department, TEST_GROUP_DEPT)