    def test_handle_messages_not_dm(self):
        '''Test receiving a message that's not from a DM channel.'''
        self.bot.user_lookup = Mock()
        self.bot.chat.get_messages.return_value = []
        self.bot.handle_messages()
        assert not self.bot.user_lookup.called, 'No user should have been looked up'
Test receiving a message that's not from a DM channel.
tests/bot_test.py