'Should request redirection of standard stream files.'

def test_redirects_standard_streams(self):

    instance = self.test_instance
    (system_stdin, system_stdout, system_stderr) = (sys.stdin, sys.stdout, sys.stderr)
    (target_stdin, target_stdout, target_stderr) = (self.stream_files_by_name[name] for name in ['stdin', 'stdout', 'stderr'])
    expect_mock_output = ('                                                ...\n                                                Called    daemon.daemon.redirect_stream(\n                                                                %(system_stdin)r,    %(target_stdin)r)\n                                                Called    daemon.daemon.redirect_stream(\n                                                                %(system_stdout)r,    %(target_stdout)r)\n                                                Called    daemon.daemon.redirect_stream(\n                                                                %(system_stderr)r,    %(target_stderr)r)\n                                                ...\n                                                ' % vars())
    instance.open()
    self.failUnlessMockCheckerMatch(expect_mock_output)
