예제 #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
파일: hw_test.py 프로젝트: zeroluck/simian
 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
파일: hw_test.py 프로젝트: zeroluck/simian
 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()