core (tests): fixed bad use of reserved name
This commit is contained in:
parent
0ad78c5072
commit
af3ec67047
1 changed files with 39 additions and 39 deletions
|
|
@ -223,7 +223,7 @@ class XEP_groupblogTest(helpers.SatTestCase):
|
|||
def test_getGroupBlogsWithRSM(self):
|
||||
self._initialise(C.PROFILE[0])
|
||||
d = self.psclient.publish(SERVICE, NODE_ID, [ITEM_1])
|
||||
d.addCallback(lambda dummy: self.plugin.getGroupBlogs(PUBLISHER, rsm={'max': 1}, profile_key=C.PROFILE[0]))
|
||||
d.addCallback(lambda dummy: self.plugin.getGroupBlogs(PUBLISHER, rsm_data={'max_': 1}, profile_key=C.PROFILE[0]))
|
||||
result = ([ITEM_DATA_1()], {'count': '1', 'index': '0', 'first': ITEM_ID_1, 'last': ITEM_ID_1})
|
||||
return d.addCallback(self.assertEqual, result)
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ class XEP_groupblogTest(helpers.SatTestCase):
|
|||
def test_getGroupBlogsAtom(self):
|
||||
self._initialise(C.PROFILE[0])
|
||||
d = self.psclient.publish(SERVICE, NODE_ID, [ITEM_1])
|
||||
d.addCallback(lambda dummy: self.plugin.getGroupBlogsAtom(PUBLISHER, {'max': 1}, profile_key=C.PROFILE[0]))
|
||||
d.addCallback(lambda dummy: self.plugin.getGroupBlogsAtom(PUBLISHER, {'max_': 1}, profile_key=C.PROFILE[0]))
|
||||
|
||||
def cb(atom):
|
||||
self.assertIsInstance(atom, unicode)
|
||||
|
|
@ -262,7 +262,7 @@ class XEP_groupblogTest(helpers.SatTestCase):
|
|||
def test_getMassiveGroupBlogs(self):
|
||||
self._initialise(C.PROFILE[0])
|
||||
d = self.psclient.publish(SERVICE, NODE_ID, [ITEM_1])
|
||||
d.addCallback(lambda dummy: self.plugin.getMassiveGroupBlogs('JID', [jid.JID(PUBLISHER)], {'max': 1}, profile_key=C.PROFILE[0]))
|
||||
d.addCallback(lambda dummy: self.plugin.getMassiveGroupBlogs('JID', [jid.JID(PUBLISHER)], {'max_': 1}, profile_key=C.PROFILE[0]))
|
||||
result = {PUBLISHER: ([ITEM_DATA_1()], {'count': '1', 'index': '0', 'first': ITEM_ID_1, 'last': ITEM_ID_1})}
|
||||
|
||||
def clean(res):
|
||||
|
|
@ -276,7 +276,7 @@ class XEP_groupblogTest(helpers.SatTestCase):
|
|||
self._initialise(C.PROFILE[0])
|
||||
d = self.psclient.publish(SERVICE, NODE_ID, [ITEM_1])
|
||||
d.addCallback(lambda dummy: self.psclient.publish(SERVICE, COMMENTS_NODE_ID_1, [COMMENT_1, COMMENT_2]))
|
||||
d.addCallback(lambda dummy: self.plugin.getMassiveGroupBlogs('JID', [jid.JID(PUBLISHER)], {'max': 1}, profile_key=C.PROFILE[0]))
|
||||
d.addCallback(lambda dummy: self.plugin.getMassiveGroupBlogs('JID', [jid.JID(PUBLISHER)], {'max_': 1}, profile_key=C.PROFILE[0]))
|
||||
result = {PUBLISHER: ([ITEM_DATA_1(2)], {'count': '1', 'index': '0', 'first': ITEM_ID_1, 'last': ITEM_ID_1})}
|
||||
|
||||
def clean(res):
|
||||
|
|
@ -290,7 +290,7 @@ class XEP_groupblogTest(helpers.SatTestCase):
|
|||
self._initialise(C.PROFILE[0])
|
||||
d = self.psclient.publish(SERVICE, NODE_ID, [ITEM_1])
|
||||
d.addCallback(lambda dummy: self.psclient.publish(SERVICE, COMMENTS_NODE_ID_1, [COMMENT_1]))
|
||||
d.addCallback(lambda dummy: self.plugin.getGroupBlogComments(SERVICE, COMMENTS_NODE_ID_1, {'max': 1}, profile_key=C.PROFILE[0]))
|
||||
d.addCallback(lambda dummy: self.plugin.getGroupBlogComments(SERVICE, COMMENTS_NODE_ID_1, {'max_': 1}, profile_key=C.PROFILE[0]))
|
||||
result = ([COMMENT_DATA_1], {'count': '1', 'index': '0', 'first': COMMENT_ID_1, 'last': COMMENT_ID_1})
|
||||
return d.addCallback(self.assertEqual, result)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue