예제 #1
0
    def testOpsReport(self):
        device_node = self.createDeviceNode(test_generators.OperationsTestGenerator)
        report = StreamMock()
        models.Device(device_node).print_report(report)

        assert 'fakeversion' in report.output(), "Failed to compile version."
        assert 'fakebuildnumber' in report.output(), "Failed to compile build number."
예제 #2
0
    def testCPUReport(self):
        device_node = self.createDeviceNode(
            test_generators.ProcessorTestGenerator)
        report = StreamMock()
        models.Device(device_node).print_report(report)

        assert 'fake AMD model' in report.output(), "Failed to compile model name"
예제 #3
0
    def testNetReport(self):
        device_node = self.createDeviceNode(test_generators.NetworkAdapterTestGenerator)
        report = StreamMock()
        models.Device(device_node).print_report(report)

        assert 'fakeid' in report.output(), "Failed to compile PCI_id."
        assert 'fakedesc' in report.output(), "Failed to compile PCI_description."
        assert 'fakess' in report.output(), "Failed to compile PCI_subsystem."
예제 #4
0
    def testLSReport(self):
        device_node = self.createDeviceNode(test_generators.StorageTestGenerator)
        report = StreamMock()
        models.Device(device_node).print_report(report)

        assert 'fakevender:fakedevice' in report.output(), "Failed to compile vender and device."
        expected = "Storage device using the fake driver"
        assert expected in report.output(), "Failed to compile driver."
        assert 'fakedesc' in report.output(), "Failed to compile PCI_description."