def _GetSystemProfile(self): """Get hardware profile. Returns: dict from hw.SystemProfile.GetProfile Raises: hw.SystemProfilerError: error fetching and parsing System Profiler output. """ sp = hw.SystemProfile(include_only=['network', 'system']) profile = sp.GetProfile() return profile
def testInit(self): """Test __init__().""" self.assertEqual(self.sp._profile, {}) self.assertEqual(self.sp._include_only, None) temp_sp = hw.SystemProfile(include_only='foo') self.assertEqual(temp_sp._include_only, 'foo')
def setUp(self): mox.MoxTestBase.setUp(self) self.stubs = stubout.StubOutForTesting() self.sp = hw.SystemProfile()
def setUp(self): mox.MoxTestBase.setUp(self) self.sp = hw.SystemProfile()