tests: make filter-esc tests working also on travis
There stderr is not a tty, so filtering isn't turned on by default. Mock os.isatty() to fake it.
This commit is contained in:
		
							parent
							
								
									14b3acec24
								
							
						
					
					
						commit
						5b7ea16808
					
				@ -706,6 +706,7 @@ class TC_20_QubesLocal(unittest.TestCase):
 | 
			
		||||
        with open(tmpdir + '/payload') as payload:
 | 
			
		||||
            self.assertEqual(payload.read(), 'some payload\n')
 | 
			
		||||
 | 
			
		||||
    @mock.patch('os.isatty', lambda fd: fd == 2)
 | 
			
		||||
    def test_010_run_service(self):
 | 
			
		||||
        self.listen_and_send(b'0\0')
 | 
			
		||||
        with mock.patch('subprocess.Popen') as mock_proc:
 | 
			
		||||
@ -733,6 +734,7 @@ class TC_20_QubesLocal(unittest.TestCase):
 | 
			
		||||
        self.assertEqual(self.get_request(),
 | 
			
		||||
            b'dom0\0admin.vm.Start\0some-vm\0\0')
 | 
			
		||||
 | 
			
		||||
    @mock.patch('os.isatty', lambda fd: fd == 2)
 | 
			
		||||
    def test_012_run_service_user(self):
 | 
			
		||||
        self.listen_and_send(b'0\0')
 | 
			
		||||
        with mock.patch('subprocess.Popen') as mock_proc:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user