<commit_before>from __future__ import unicode_literals

from tests.frontends.mpd import protocol


class AudioOutputHandlerTest(protocol.BaseTestCase):
    def test_enableoutput(self):
        self.sendRequest('enableoutput "0"')
        self.assertInResponse('OK')

    def test_disableoutput(self):
        self.sendRequest('disableoutput "0"')
        self.assertInResponse('OK')

    def test_outputs(self):
        self.sendRequest('outputs')
        self.assertInResponse('outputid: 0')
        self.assertInResponse('outputname: Default')
        self.assertInResponse('outputenabled: 1')
        self.assertInResponse('OK')<commit_msg>mpd: Test that output enabling/disabling unmutes/mutes audio<commit_after>from __future__ import unicode_literals

from tests.frontends.mpd import protocol


class AudioOutputHandlerTest(protocol.BaseTestCase):
    def test_enableoutput(self):
        self.core.playback.mute = True

        self.sendRequest('enableoutput "0"')

        self.assertInResponse('OK')
        self.assertEqual(self.core.playback.mute.get(), False)

    def test_disableoutput(self):
        self.core.playback.mute = False

        self.sendRequest('disableoutput "0"')

        self.assertInResponse('OK')
        self.assertEqual(self.core.playback.mute.get(), True)

    def test_outputs_when_unmuted(self):
        self.core.playback.mute = False

        self.sendRequest('outputs')

        self.assertInResponse('outputid: 0')
        self.assertInResponse('outputname: Default')
        self.assertInResponse('outputenabled: 1')
        self.assertInResponse('OK')

    def test_outputs_when_muted(self):
        self.core.playback.mute = True

        self.sendRequest('outputs')

        self.assertInResponse('outputid: 0')
        self.assertInResponse('outputname: Default')
        self.assertInResponse('outputenabled: 0')
        self.assertInResponse('OK')
{'fraction_non_alphanumeric': 0.11070110701107011, 'fraction_numerical': 0.005271481286241434, 'mean_word_length': 3.486997635933806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6339229', 'n_tokens_mistral': 559, 'n_tokens_neox': 535, 'n_words': 87}