def testDelete(self, getStubMock): stubMock = mock.Mock() stubMock.Delete.return_value = host_pb2.HostDeleteResponse() getStubMock.return_value = stubMock host = opencue.wrappers.host.Host(host_pb2.Host(name=TEST_HOST_NAME)) host.delete() stubMock.Delete.assert_called_with( host_pb2.HostDeleteRequest(host=host.data), timeout=mock.ANY)
def delete(self): """Delete the host from the cuebot""" self.stub.Delete(host_pb2.HostDeleteRequest(host=self.data), timeout=Cuebot.Timeout)