'Run the edit command, with mocked stdin and yaml writing, and
passing `args` to `run_command`.'

def run_mocked_command(self, modify_file_args={}, stdin=[], args=[]):

    m = ModifyFileMocker(**modify_file_args)
    with patch('beetsplug.edit.edit', side_effect=m.action):
        with control_stdin('\n'.join(stdin)):
            self.run_command('edit', *args)
