diff --git a/SupyML/test.py b/SupyML/test.py
index 336f84f..5241963 100644
--- a/SupyML/test.py
+++ b/SupyML/test.py
@@ -30,8 +30,29 @@
from supybot.test import *
-class SupyMLTestCase(PluginTestCase):
- plugins = ('SupyML',)
+class SupyMLTestCase(ChannelPluginTestCase):
+ plugins = ('SupyML', 'Utilities')
+ #################################
+ # Utilities
+ def _getIfSomething(self, msg):
+ m = self.irc.takeMsg()
+ while m is not None:
+ if repr(m) == repr(msg):
+ return True
+ m = self.irc.takeMsg()
+ return False
+
+ _tell = 'ProgVal foo'
+
+ def testBasic(self):
+ self.assertError('SupyML eval')
+ self.assertResponse('SupyML eval foo', 'foo')
+ msg = ircmsgs.privmsg(self.channel, '@SupyML eval %s' % self._tell,
+ prefix=self.prefix)
+ self.irc.feedMsg(msg)
+ answer = ircmsgs.IrcMsg(prefix="", command="PRIVMSG",
+ args=('ProgVal', 'test wants me to tell you: foo'))
+ self.failIf(self._getIfSomething(answer) == False)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: