def test_workerStatusNonNegative(self): """ L{WorkerStatus.__repr__} will show all the values associated with the status of the worker. """ w = WorkerStatus() w.adjust( acknowledged=1, unacknowledged=-1, total=1, ) self.assertEquals(w.acknowledged, 1) self.assertEquals(w.unacknowledged, 0) self.assertEquals(w.total, 1)
def test_workerStatusRepr(self): """ L{WorkerStatus.__repr__} will show all the values associated with the status of the worker. """ self.assertEquals(repr(WorkerStatus(1, 2, 3, 4, 5, 6, 7, 8)), "<WorkerStatus acknowledged=1 unacknowledged=2 total=3 " "started=4 abandoned=5 unclosed=6 starting=7 stopped=8>")