

def test_online(self):
    mock_process = subprocess_mock(self.mox, 'acpi -V', shell=True, stdout=subprocess.PIPE)
    mock_process.stdout = StringIO.StringIO(self.acpi_online)
    mock_process.communicate(None).AndReturn(('', ''))
    mock_process.returncode = 0
    self.mox.ReplayAll()
    self.assertTrue(portable_platform.get_ac_status())

dataset/ETHPy150Open timvideos/streaming-system/tools/portable/portable_platform_test.py ACStatusTest.test_online/original