Mercurial > libervia-pubsub
comparison idavoll/test/test_gateway.py @ 186:365fd3e4daf8
Add maxItems support.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Wed, 16 Apr 2008 14:14:27 +0000 |
parents | 9038908dc2f5 |
children | 69cdd8c6a431 |
comparison
equal
deleted
inserted
replaced
185:9038908dc2f5 | 186:365fd3e4daf8 |
---|---|
147 d = self.client.subscribe('xmpp:%s?node=test' % componentJID) | 147 d = self.client.subscribe('xmpp:%s?node=test' % componentJID) |
148 self.assertFailure(d, error.Error) | 148 self.assertFailure(d, error.Error) |
149 d.addCallback(cb) | 149 d.addCallback(cb) |
150 return d | 150 return d |
151 | 151 |
152 | |
152 def test_items(self): | 153 def test_items(self): |
153 def cb(response): | 154 def cb(response): |
154 xmppURI = response['uri'] | 155 xmppURI = response['uri'] |
155 d = self.client.items(xmppURI) | 156 d = self.client.items(xmppURI) |
156 return d | 157 return d |
157 | 158 |
158 def cb2(result): | 159 d = self.client.publish(entry) |
159 return | 160 d.addCallback(cb) |
161 return d | |
162 | |
163 | |
164 def test_itemsMaxItems(self): | |
165 def cb(response): | |
166 xmppURI = response['uri'] | |
167 d = self.client.items(xmppURI, 2) | |
168 return d | |
160 | 169 |
161 d = self.client.publish(entry) | 170 d = self.client.publish(entry) |
162 d.addCallback(cb) | 171 d.addCallback(cb) |
163 d.addCallback(cb2) | |
164 return d | 172 return d |