def test_log_to_stderr(self): """Test log_to_file=False property""" with patch('gstswitch.server.ProcessMonitor') as mock: serv = Server(path='abc') serv.log_to_file = False serv._start_process('cmd') mock.assert_called_with('cmd')
def test_log_to_stderr(self): """Test log_to_file=False property""" with patch("gstswitch.server.ProcessMonitor") as mock: serv = Server(path="abc") serv.log_to_file = False serv._start_process("cmd") mock.assert_called_with("cmd")
def test_log_to_file(self): """Test log_to_file=True property""" with patch('gstswitch.server.open', create=True) as mock_open: mock_open.return_value = 123 with patch('gstswitch.server.ProcessMonitor') as mock: serv = Server(path='abc') serv.log_to_file = True serv._start_process('cmd') mock.assert_called_with('cmd', 123)
def test_log_to_file(self): """Test log_to_file=True property""" with patch("gstswitch.server.open", create=True) as mock_open: mock_open.return_value = 123 with patch("gstswitch.server.ProcessMonitor") as mock: serv = Server(path="abc") serv.log_to_file = True serv._start_process("cmd") mock.assert_called_with("cmd", 123)