Commits

Jason R. Coombs  committed e558ce1

Added test for SingleServerIRCBot construction

  • Participants
  • Parent commits 37ee422

Comments (0)

Files changed (1)

File irc/tests/test_bot.py

         channel = irc.bot.Channel()
         channel.add_user('tester1')
         assert channel.has_user('Tester1')
+
+class TestBot(object):
+    def test_construct_bot(self):
+        bot = irc.bot.SingleServerIRCBot(
+            server_list = [('localhost', '9999')],
+            realname = 'irclibbot',
+            nickname = 'irclibbot',
+        )
+        assert len(bot.server_list) == 1
+        svr = bot.server_list[0]
+        assert svr.host == 'localhost'
+        assert svr.port == '9999'
+        assert svr.password is None