Beispiel #1
0
    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
Beispiel #2
0
 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')
Beispiel #3
0
 def setUp(self):
   mox.MoxTestBase.setUp(self)
   self.stubs = stubout.StubOutForTesting()
   self.sp = hw.SystemProfile()
Beispiel #4
0
 def setUp(self):
     mox.MoxTestBase.setUp(self)
     self.sp = hw.SystemProfile()