mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Fixed some failing test cases.
This commit is contained in:
parent
44227181b7
commit
660ba14e96
@ -256,7 +256,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
return
|
return
|
||||||
# Otherwise,
|
# Otherwise,
|
||||||
cursor.execute("""INSERT INTO factoids VALUES
|
cursor.execute("""INSERT INTO factoids VALUES
|
||||||
(%s, %s, %s, NULL, NULL, NULL, NULL, NULL,
|
(%s, %s, %s, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
%s, 0)""",
|
%s, 0)""",
|
||||||
key, id, int(time.time()), fact)
|
key, id, int(time.time()), fact)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
|
@ -91,7 +91,8 @@ if sqlite is not None:
|
|||||||
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
||||||
'.*?\. Last modified by tester on .*?\. '
|
'.*?\. Last modified by tester on .*?\. '
|
||||||
'Last requested by foo!bar@baz on .*?, '
|
'Last requested by foo!bar@baz on .*?, '
|
||||||
'requested 2 times. Locked on .*\.$')
|
'requested 2 times. '
|
||||||
|
'Locked by tester on .*\.$')
|
||||||
self.assertNotError('unlock moo')
|
self.assertNotError('unlock moo')
|
||||||
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
||||||
'.*?\. Last modified by tester on .*?\. '
|
'.*?\. Last modified by tester on .*?\. '
|
||||||
@ -110,13 +111,13 @@ if sqlite is not None:
|
|||||||
self.assertNotError('moo is <reply>moo')
|
self.assertNotError('moo is <reply>moo')
|
||||||
self.assertNotError('lock moo')
|
self.assertNotError('lock moo')
|
||||||
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
||||||
'.*?\. Locked on .*?\.')
|
'.*?\. Locked by tester on .*?\.')
|
||||||
# switch user
|
# switch user
|
||||||
self.prefix = 'moo!moo@moo'
|
self.prefix = 'moo!moo@moo'
|
||||||
self.assertNotError('register nottester moo')
|
self.assertNotError('register nottester moo')
|
||||||
self.assertError('unlock moo')
|
self.assertError('unlock moo')
|
||||||
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
self.assertRegexp('factinfo moo', '^moo: Created by tester on'
|
||||||
'.*?\. Locked on .*?\.')
|
'.*?\. Locked by tester on .*?\.')
|
||||||
# switch back
|
# switch back
|
||||||
self.prefix = 'foo!bar@baz'
|
self.prefix = 'foo!bar@baz'
|
||||||
self.assertNotError('identify tester moo')
|
self.assertNotError('identify tester moo')
|
||||||
@ -162,8 +163,7 @@ if sqlite is not None:
|
|||||||
|
|
||||||
def testListauth(self):
|
def testListauth(self):
|
||||||
self.assertNotError('moo is <reply>moo')
|
self.assertNotError('moo is <reply>moo')
|
||||||
self.assertResponse('listauth tester', 'Author search for tester '
|
self.assertRegexp('listauth tester', 'tester.*\(1 found\):.*moo')
|
||||||
'(1 found): \'moo\'')
|
|
||||||
self.assertError('listauth moo')
|
self.assertError('listauth moo')
|
||||||
|
|
||||||
def testDelete(self):
|
def testDelete(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user