Commits

Jason R. Coombs  committed fc86377

Fixed NameError in rand_bot

  • Participants
  • Parent commits cd6cbec
  • Tags 1100.5.8

Comments (0)

Files changed (2)

File pmxbot/pmxbot.py

 	import simplejson as json
 from xml.etree import ElementTree
 
+import popquotes.pmxbot as pq
+
 from .botbase import (command, contains, execdelay, execat,
 	_handler_registry, NoLog, LoggingCommandBot)
 from . import botbase
 		golfclap, excuse, nastygram, curse, bless, job, hire, oregontrail,
 		chain, tinytear, blame, panic, rubberstamp, dance, annoy, klingon,
 		storytime, murphy]
-	quote_functions = [quote, zoidberg, simpsons, bender, hal, grail, R,
-		anchorman, hangover]
+	quote_functions = [quote, pq.zoidberg, pq.simpsons, pq.bender,
+		pq.hal, pq.grail, pq.R, pq.anchorman, pq.hangover]
 	func = random.choice(normal_functions + quote_functions)
 	nick = nick if func in normal_functions else ''
 	return func(client, event, channel, 'pmxbot', nick)

File tests/unit/test_commands.py

 		popquotes.pmxbot.install_commands()
 		res = popquotes.pmxbot.bender(c, e, '#test', 'testrunner', '')
 		assert len(res) > 5
+
+	def test_rand_bot(self):
+		res = pmxbot.rand_bot(c, e, '#test', 'testrunner', '')
+		assert len(res) > 5