Example #1
0
 def setName(self, name):
     """Sets the name of this filter
     @type  name: str
     @param name: The new name for this filter"""
     self.stub.SetName(filter_pb2.FilterSetNameRequest(filter=self.data,
                                                       name=name),
                       timeout=Cuebot.Timeout)
Example #2
0
    def setName(self, name):
        """Sets the name of the filter.

        :type  name: str
        :param name: new filter name
        """
        self.stub.SetName(filter_pb2.FilterSetNameRequest(filter=self.data,
                                                          name=name),
                          timeout=Cuebot.Timeout)
Example #3
0
    def testSetName(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.SetName.return_value = filter_pb2.FilterSetNameResponse()
        getStubMock.return_value = stubMock

        value = 'newname'
        filterToSet = opencue.wrappers.filter.Filter(filter_pb2.Filter(name=TEST_FILTER_NAME))
        filterToSet.setName(value)

        stubMock.SetName.assert_called_with(
            filter_pb2.FilterSetNameRequest(filter=filterToSet.data, name=value), timeout=mock.ANY)