Example #1
0
    def testDelete(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = filter_pb2.MatcherDeleteResponse()
        getStubMock.return_value = stubMock

        matcher = opencue.wrappers.filter.Matcher(
            filter_pb2.Matcher(id=TEST_MATCHER_ID))
        matcher.delete()

        stubMock.Delete.assert_called_with(
            filter_pb2.MatcherDeleteRequest(matcher=matcher.data), timeout=mock.ANY)
Example #2
0
 def delete(self):
     self.stub.Delete(filter_pb2.MatcherDeleteRequest(matcher=self.data),
                      timeout=Cuebot.Timeout)