class Plugin:
    def __init__(self, channels):
        self.channels = channels

    def on_ready(self, bot):
        for channel in self.channels:
            bot.join(channel)

    def on_help(self):
        return "Automatically joins channels when the bot connects."

@@ -1,8 +1,25 @@
+import unittest%0A%0A
 class Pl
@@ -282,8 +282,483 @@
 nects.%22%0A
+%0A%0Aclass Test(unittest.TestCase):%0A    class ExampleBot:%0A        def __init__(self, test, channel):%0A            self.test = test%0A            self.channel = channel%0A%0A        def join(self, channel):%0A            self.test.assertEqual(channel, self.channel)%0A%0A    def setUp(self):%0A        self.plugin = Plugin(%5B%22#test%22%5D)%0A%0A    def test_join(self):%0A        self.plugin.on_ready(Test.ExampleBot(self, %22#test%22))%0A%0A    def test_help(self):%0A        self.assertTrue(self.plugin.on_help())%0A

Add tests to autojoin plugin