mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
plugins/QuoteGrabs: Order the quotes in reverse chronological order.
This commit is contained in:
parent
cede4a4a97
commit
a035492295
@ -128,7 +128,7 @@ class SqliteQuoteGrabsDB(object):
|
|||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
cursor.execute("""SELECT id, quote FROM quotegrabs
|
cursor.execute("""SELECT id, quote FROM quotegrabs
|
||||||
WHERE nickeq(nick, %s)
|
WHERE nickeq(nick, %s)
|
||||||
ORDER BY id ASC""", nick)
|
ORDER BY id DESC""", nick)
|
||||||
return [QuoteGrabsRecord(id, text=quote)
|
return [QuoteGrabsRecord(id, text=quote)
|
||||||
for (id, quote) in cursor.fetchall()]
|
for (id, quote) in cursor.fetchall()]
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class QuoteGrabsTestCase(ChannelPluginTestCase):
|
|||||||
prefix=testPrefix))
|
prefix=testPrefix))
|
||||||
self.assertNotError('grab foo')
|
self.assertNotError('grab foo')
|
||||||
self.assertResponse('quotegrabs list foo',
|
self.assertResponse('quotegrabs list foo',
|
||||||
'#1: test and #2: %s...' %\
|
'#2: %s... and #1: test' %\
|
||||||
('a'*43)) # 50 - length of "#2: ..."
|
('a'*43)) # 50 - length of "#2: ..."
|
||||||
|
|
||||||
def testDuplicateGrabs(self):
|
def testDuplicateGrabs(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user