def testPipeNoLines(self): process = MockProcess(rc=0, lines=[]) self.assertEqual(process.pipe(''), '')
def testPipeFailure(self): process = MockProcess(rc=1, lines=['these', 'are', '4', 'lines']) self.assertEqual(process.pipe(''), '')
def testPipeSuccess(self): process = MockProcess(rc=0, lines=['these', 'are', '4', 'lines']) self.assertEqual(process.pipe(''), 'these')