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