def test_subscribe_one(self):
        try:
            os.remove(self.service.SUB_FILE)
        except __HOLE__:
            pass

        self.service.start()
        threading.Event().wait(.1)
        self.service.stop()

        self.service._twitch.set_exists_channel_list(['testch1', 'testch2'])
        fake_sender = CommandSubmitter('test', 'fake_sender')
        self.service._subscribe(['testch1'], fake_sender)

        ok_('testch1' in [x.lower() for x in self.service._sublist[fake_sender]],
            'sublist = '+str(self.service._sublist[fake_sender]))
        ok_('not found' not in ' '.join(interfaces.get('test').msg_queue[fake_sender]))
        ok_(self.service._channel_sub_count['testch1'] == 1)

        fake_sender2 = CommandSubmitter('test', 'fake_sender2')
        self.service._subscribe(['testch1'], fake_sender2)

        ok_(self.service._channel_sub_count['testch1'] == 2)
dataset/ETHPy150Open KavenC/Linot/tests/services/test_twitch_notifier.py/TestService.test_subscribe_one