示例#1
0
文件: client.py 项目: zeroluck/simian
    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
示例#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')
示例#3
0
 def setUp(self):
   mox.MoxTestBase.setUp(self)
   self.stubs = stubout.StubOutForTesting()
   self.sp = hw.SystemProfile()
示例#4
0
 def setUp(self):
     mox.MoxTestBase.setUp(self)
     self.sp = hw.SystemProfile()