UnitTest - Alias for runSuccess

* Use t() (given t = Task()) as an alias to t.runSuccess()
This commit is contained in:
Renato Alves 2014-07-13 19:53:32 +01:00
parent ceaf9d3462
commit 6a28c2d175

View file

@ -58,6 +58,10 @@ class Task(object):
txt = super(Task, self).__repr__() txt = super(Task, self).__repr__()
return "{0} running from {1}>".format(txt[:-1], self.datadir) return "{0} running from {1}>".format(txt[:-1], self.datadir)
def __call__(self, *args, **kwargs):
"Alias to runSuccess"
return self.runSuccess(*args, **kwargs)
def bind_taskd_server(self, taskd): def bind_taskd_server(self, taskd):
"""Configure the present task client to talk to given taskd server """Configure the present task client to talk to given taskd server