mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +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.execute("""SELECT id, quote FROM quotegrabs
|
||||
WHERE nickeq(nick, %s)
|
||||
ORDER BY id ASC""", nick)
|
||||
ORDER BY id DESC""", nick)
|
||||
return [QuoteGrabsRecord(id, text=quote)
|
||||
for (id, quote) in cursor.fetchall()]
|
||||
|
||||
|
@ -60,7 +60,7 @@ class QuoteGrabsTestCase(ChannelPluginTestCase):
|
||||
prefix=testPrefix))
|
||||
self.assertNotError('grab foo')
|
||||
self.assertResponse('quotegrabs list foo',
|
||||
'#1: test and #2: %s...' %\
|
||||
'#2: %s... and #1: test' %\
|
||||
('a'*43)) # 50 - length of "#2: ..."
|
||||
|
||||
def testDuplicateGrabs(self):
|
||||
@ -109,7 +109,7 @@ class QuoteGrabsTestCase(ChannelPluginTestCase):
|
||||
self.assertError('quotegrabs search test') # still none in db
|
||||
self.assertNotError('grab foo')
|
||||
self.assertNotError('quotegrabs search test')
|
||||
|
||||
|
||||
|
||||
class QuoteGrabsNonChannelTestCase(QuoteGrabsTestCase):
|
||||
config = { 'databases.plugins.channelSpecific' : False }
|
||||
|
Loading…
Reference in New Issue
Block a user