示例#1
0
    def testDelete(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = host_pb2.OwnerDeleteResponse()
        getStubMock.return_value = stubMock

        owner = opencue.wrappers.owner.Owner(
            host_pb2.Owner(id=TEST_OWNER_ID, name=TEST_OWNER_NAME))
        owner.delete()

        stubMock.Delete.assert_called_with(
            host_pb2.OwnerDeleteRequest(owner=owner.data), timeout=mock.ANY)
示例#2
0
 def delete(self):
     """Delete the owner record"""
     self.stub.Delete(host_pb2.OwnerDeleteRequest(owner=self.data), timeout=Cuebot.Timeout)