'Test the command line output.'

def test_command_line_output(self):

    with tempfile.TemporaryDirectory() as tempdirname:
        filename = os.path.join(tempdirname, 'message.txt')
        message = 'one,    two,    testing,    testing'
        with assert_setup_component(1) as handle_config:
            self.assertTrue(setup_component(self.hass, notify.DOMAIN, {'notify': {'name': 'test', 'platform': 'command_line', 'command': 'echo    $(cat)    >    {}'.format(filename)}}))
        assert handle_config[notify.DOMAIN]
        self.assertTrue(self.hass.services.call('notify', 'test', {'message': message}, blocking=True))
        with open(filename) as fil:
            self.assertEqual(fil.read(), '{}\n'.format(message))
