def setName(self, name): """Sets the name of the group. :type name: str :param name: new name for the group """ self.stub.SetName(job_pb2.GroupSetNameRequest(group=self.data, name=name), timeout=Cuebot.Timeout)
def testSetName(self, getStubMock): stubMock = mock.Mock() stubMock.SetName.return_value = job_pb2.GroupSetNameResponse() getStubMock.return_value = stubMock newName = 'changedName' group = opencue.wrappers.group.Group( job_pb2.Group(name=TEST_GROUP_NAME)) group.setName(newName) stubMock.SetName.assert_called_with( job_pb2.GroupSetNameRequest(group=group.data, name=newName), timeout=mock.ANY)
def setName(self, name): self.stub.SetName(job_pb2.GroupSetNameRequest(group=self.data, name=name), timeout=Cuebot.Timeout)