    def test_populate(self):
        '''
        Tests populating users.
        '''
        sb = bot.SecurityBot(None, lambda *args: None, None)
        user = {'id': 'id', 'name': 'name'}
        sb._api_call = Mock()
        sb.chat.get_users.return_value = [user]
        sb._populate_users()
        sb.chat.get_users.assert_called_with()
        assert user['id'] in sb.users
        assert user['name'] in sb.users_by_name
Tests populating users.
tests/bot_test.py