Exemplo n.º 1
0
 def testDeviceInfo181Fields(self):
     device_info.PROC_UPTIME = 'testdata/device_info/uptime'
     di = device_info.DeviceInfo181Linux26(TestDeviceId())
     self.assertEqual(di.UpTime, 123)
     self.assertEqual(di.VendorLogFileNumberOfEntries, 0)
     self.assertEqual(di.VendorConfigFileNumberOfEntries, 0)
     self.assertEqual(di.LocationNumberOfEntries, 0)
Exemplo n.º 2
0
 def testDeviceId(self):
     did = TestDeviceId()
     di = device_info.DeviceInfo181Linux26(did)
     self.assertEqual(did.Manufacturer, di.Manufacturer)
     self.assertEqual(did.ManufacturerOUI, di.ManufacturerOUI)
     self.assertEqual(did.ModelName, di.ModelName)
     self.assertEqual(did.Description, di.Description)
     self.assertEqual(did.SerialNumber, di.SerialNumber)
     self.assertEqual(did.HardwareVersion, di.HardwareVersion)
     self.assertEqual(did.AdditionalHardwareVersion,
                      di.AdditionalHardwareVersion)
     self.assertEqual(did.SoftwareVersion, di.SoftwareVersion)
     self.assertEqual(did.AdditionalSoftwareVersion,
                      di.AdditionalSoftwareVersion)
     self.assertEqual(did.ProductClass, di.ProductClass)
Exemplo n.º 3
0
 def testDeviceId(self):
     did = TestDeviceId()
     di = device_info.DeviceInfo181Linux26(did)
     self.assertEqual(did.Manufacturer, di.Manufacturer)
     self.assertEqual(did.ManufacturerOUI, di.ManufacturerOUI)
     self.assertEqual(did.ModelName, di.ModelName)
     self.assertEqual(did.Description, di.Description)
     self.assertEqual(did.SerialNumber, di.SerialNumber)
     self.assertEqual(did.HardwareVersion, di.HardwareVersion)
     self.assertEqual(did.AdditionalHardwareVersion,
                      di.AdditionalHardwareVersion)
     self.assertEqual(did.SoftwareVersion, di.SoftwareVersion)
     self.assertEqual(did.AdditionalSoftwareVersion,
                      di.AdditionalSoftwareVersion)
     self.assertEqual(did.ProductClass, di.ProductClass)
     self.assertEqual(di.VendorConfigFileNumberOfEntries, 0)
     self.assertRaises(AttributeError, setattr, di,
                       'VendorConfigFileNumberOfEntries', 1)
Exemplo n.º 4
0
 def testValidate181(self):
     di = device_info.DeviceInfo181Linux26(TestDeviceId())
     tr.handle.ValidateExports(di)
Exemplo n.º 5
0
 def testUptimeSuccess(self):
     device_info.PROC_UPTIME = 'testdata/device_info/uptime'
     di = device_info.DeviceInfo181Linux26(TestDeviceId())
     self.assertEqual(di.UpTime, '123')
Exemplo n.º 6
0
 def testValidate181(self):
     di = device_info.DeviceInfo181Linux26(TestDeviceId())
     di.ValidateExports()