def setType(self, filterType): """Changes the filter type @type filterType: FilterType @param filterType: The new filter type""" self.stub.SetType(filter_pb2.FilterSetTypeRequest(filter=self.data, type=filterType), timeout=Cuebot.Timeout)
def setType(self, filterType): """Changes the filter type. :type filterType: opencue.compiled_proto.filter_pb2.FilterType :param filterType: the new filter type """ self.stub.SetType(filter_pb2.FilterSetTypeRequest(filter=self.data, type=filterType), timeout=Cuebot.Timeout)
def testSetType(self, getStubMock): stubMock = mock.Mock() stubMock.SetType.return_value = filter_pb2.FilterSetTypeResponse() getStubMock.return_value = stubMock value = filter_pb2.MATCH_ALL filterToSet = opencue.wrappers.filter.Filter(filter_pb2.Filter(name=TEST_FILTER_NAME)) filterToSet.setType(value) stubMock.SetType.assert_called_with( filter_pb2.FilterSetTypeRequest(filter=filterToSet.data, type=value), timeout=mock.ANY)