diff options
-rw-r--r-- | qpid/python/qpid/messaging/endpoints.py | 2 | ||||
-rw-r--r-- | qpid/python/qpid/tests/messaging/endpoints.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/qpid/python/qpid/messaging/endpoints.py b/qpid/python/qpid/messaging/endpoints.py index 143daf616a..89db45af1b 100644 --- a/qpid/python/qpid/messaging/endpoints.py +++ b/qpid/python/qpid/messaging/endpoints.py @@ -988,7 +988,7 @@ class Receiver(Endpoint, object): """ Returns the number of acknowledged messages awaiting confirmation. """ - return len([m for m in self.acked if m._receiver is self]) + return len([m for m in self.session.acked if m._receiver is self]) @synchronized def available(self): diff --git a/qpid/python/qpid/tests/messaging/endpoints.py b/qpid/python/qpid/tests/messaging/endpoints.py index a82a9e95ed..cb924dc096 100644 --- a/qpid/python/qpid/tests/messaging/endpoints.py +++ b/qpid/python/qpid/tests/messaging/endpoints.py @@ -890,7 +890,10 @@ class ReceiverTests(Base): self.assertEmpty(rb2) self.drain(self.rcv, expected=[]) - # XXX: need testUnsettled() + def testUnsettled(self): + # just tests the code path and not the value + rcv = self.ssn.receiver('test-receiver-unsettled-queue; {create: always, delete: always}') + rcv.unsettled() def unreliabilityTest(self, mode="unreliable"): msgs = [self.message("testUnreliable", i) for i in range(3)] |