def test_connect_discord(discord_listener, monkeypatch): monkeypatch.setattr( "chitanda.bot.config", { "webserver": { "enable": True }, "discord_token": "token" }, ) chitanda = Chitanda() chitanda._connect_discord() assert discord_listener.return_value.run.called_with("token")
def test_connect_discord(discord_listener, monkeypatch): monkeypatch.setattr( 'chitanda.bot.config', { 'webserver': { 'enable': True }, 'discord_token': 'token' }, ) chitanda = Chitanda() chitanda._connect_discord() assert discord_listener.return_value.run.called_with('token')