mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-22 10:04:25 +01:00
Later & Topic: Fix tests to work with latest configuration changes.
This commit is contained in:
parent
80bb63460d
commit
7b7b93eee6
@ -79,7 +79,7 @@ class LaterTestCase(ChannelPluginTestCase):
|
|||||||
prefix=testPrefix))
|
prefix=testPrefix))
|
||||||
m = self.getMsg(' ')
|
m = self.getMsg(' ')
|
||||||
self.assertEqual(str(m).strip(),
|
self.assertEqual(str(m).strip(),
|
||||||
'PRIVMSG foo :Sent just now: <test> stuff')
|
'PRIVMSG #test :foo: Sent just now: <test> stuff')
|
||||||
self.assertNotRegexp('later notes', 'foo')
|
self.assertNotRegexp('later notes', 'foo')
|
||||||
self.assertRegexp('later notes', 'bar')
|
self.assertRegexp('later notes', 'bar')
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ class LaterTestCase(ChannelPluginTestCase):
|
|||||||
prefix='bar!baz@qux'))
|
prefix='bar!baz@qux'))
|
||||||
m = self.getMsg(' ')
|
m = self.getMsg(' ')
|
||||||
self.assertEqual(str(m).strip(),
|
self.assertEqual(str(m).strip(),
|
||||||
'PRIVMSG bar :Sent 1 minute ago: <test> more stuff')
|
'PRIVMSG #test :bar: Sent 1 minute ago: <test> more stuff')
|
||||||
time.time = real_time
|
time.time = real_time
|
||||||
|
|
||||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||||
|
@ -65,11 +65,11 @@ class TopicTestCase(ChannelPluginTestCase):
|
|||||||
m = self.getMsg('topic add foo')
|
m = self.getMsg('topic add foo')
|
||||||
self.assertEqual(m.command, 'TOPIC')
|
self.assertEqual(m.command, 'TOPIC')
|
||||||
self.assertEqual(m.args[0], self.channel)
|
self.assertEqual(m.args[0], self.channel)
|
||||||
self.assertEqual(m.args[1], 'foo (test)')
|
self.assertEqual(m.args[1], 'foo')
|
||||||
m = self.getMsg('topic add bar')
|
m = self.getMsg('topic add bar')
|
||||||
self.assertEqual(m.command, 'TOPIC')
|
self.assertEqual(m.command, 'TOPIC')
|
||||||
self.assertEqual(m.args[0], self.channel)
|
self.assertEqual(m.args[0], self.channel)
|
||||||
self.assertEqual(m.args[1], 'foo (test) || bar (test)')
|
self.assertEqual(m.args[1], 'foo || bar')
|
||||||
|
|
||||||
def testManageCapabilities(self):
|
def testManageCapabilities(self):
|
||||||
try:
|
try:
|
||||||
@ -93,9 +93,9 @@ class TopicTestCase(ChannelPluginTestCase):
|
|||||||
|
|
||||||
def testInsert(self):
|
def testInsert(self):
|
||||||
m = self.getMsg('topic add foo')
|
m = self.getMsg('topic add foo')
|
||||||
self.assertEqual(m.args[1], 'foo (test)')
|
self.assertEqual(m.args[1], 'foo')
|
||||||
m = self.getMsg('topic insert bar')
|
m = self.getMsg('topic insert bar')
|
||||||
self.assertEqual(m.args[1], 'bar (test) || foo (test)')
|
self.assertEqual(m.args[1], 'bar || foo')
|
||||||
|
|
||||||
def testChange(self):
|
def testChange(self):
|
||||||
_ = self.getMsg('topic add foo')
|
_ = self.getMsg('topic add foo')
|
||||||
@ -143,9 +143,9 @@ class TopicTestCase(ChannelPluginTestCase):
|
|||||||
_ = self.getMsg('topic add foo')
|
_ = self.getMsg('topic add foo')
|
||||||
self.assertRegexp('topic list', '1: foo')
|
self.assertRegexp('topic list', '1: foo')
|
||||||
_ = self.getMsg('topic add bar')
|
_ = self.getMsg('topic add bar')
|
||||||
self.assertRegexp('topic list', '1: foo .*2: bar')
|
self.assertRegexp('topic list', '1: foo.*2: bar')
|
||||||
_ = self.getMsg('topic add baz')
|
_ = self.getMsg('topic add baz')
|
||||||
self.assertRegexp('topic list', '1: foo .* 2: bar .* and 3: baz')
|
self.assertRegexp('topic list', '1: foo.* 2: bar.* and 3: baz')
|
||||||
|
|
||||||
def testSet(self):
|
def testSet(self):
|
||||||
_ = self.getMsg('topic add foo')
|
_ = self.getMsg('topic add foo')
|
||||||
|
Loading…
Reference in New Issue
Block a user