comparison src/test/test_plugin_xep_0313.py @ 1424:2d8fccec84e8

core (tests): test fixes
author Goffi <goffi@goffi.org>
date Thu, 23 Apr 2015 14:19:43 +0200
parents 069ad98b360d
children d17772b0fe22
comparison
equal deleted inserted replaced
1423:882e5fabf68c 1424:2d8fccec84e8
149 </query> 149 </query>
150 </iq> 150 </iq>
151 """ % (("H_%d" % domish.Element._idCounter), SERVICE) 151 """ % (("H_%d" % domish.Element._idCounter), SERVICE)
152 start = datetime.datetime(2010, 8, 7, 0, 0, 0, tzinfo=tzutc()) 152 start = datetime.datetime(2010, 8, 7, 0, 0, 0, tzinfo=tzutc())
153 form = buildForm(start=start) 153 form = buildForm(start=start)
154 rsm = RSMRequest(max=10) 154 rsm = RSMRequest(max_=10)
155 d = self.plugin.queryArchive(SERVICE_JID, form=form, rsm=rsm, profile_key=C.PROFILE[0]) 155 d = self.plugin.queryArchive(SERVICE_JID, form=form, rsm=rsm, profile_key=C.PROFILE[0])
156 d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), xml, True)) 156 d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), xml, True))
157 return d 157 return d
158 158
159 def test_queryArchiveRSMPaging(self): 159 def test_queryArchiveRSMPaging(self):
171 </query> 171 </query>
172 </iq> 172 </iq>
173 """ % (("H_%d" % domish.Element._idCounter), SERVICE) 173 """ % (("H_%d" % domish.Element._idCounter), SERVICE)
174 start = datetime.datetime(2010, 8, 7, 0, 0, 0, tzinfo=tzutc()) 174 start = datetime.datetime(2010, 8, 7, 0, 0, 0, tzinfo=tzutc())
175 form = buildForm(start=start) 175 form = buildForm(start=start)
176 rsm = RSMRequest(max=10, after=u'09af3-cc343-b409f') 176 rsm = RSMRequest(max_=10, after=u'09af3-cc343-b409f')
177 d = self.plugin.queryArchive(SERVICE_JID, form=form, rsm=rsm, profile_key=C.PROFILE[0]) 177 d = self.plugin.queryArchive(SERVICE_JID, form=form, rsm=rsm, profile_key=C.PROFILE[0])
178 d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), xml, True)) 178 d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), xml, True))
179 return d 179 return d
180 180
181 def test_queryFields(self): 181 def test_queryFields(self):