l.h.s.t.t.TestHWDBSubmissionTablePopulation(TestCaseHWDB) : class documentation

Part of lp.hardwaredb.scripts.tests.test_hwdb_submission_processing View In Hierarchy

Tests of the HWDB popoluation with submitted data.
Method setUp Setup the test environment.
Method getLogData Undocumented
Method setHALDevices Undocumented
Method testGetDriverNoDriverInfo Test of HALDevice.getDriver().
Method testGetDriverWithDriverInfo Test of HALDevice.getDriver().
Method testEnsureVendorIDVendorNameExistsRegularCase Test of ensureVendorIDVendorNameExists(self), regular case.
Method runTestEnsureVendorIDVendorNameExistsVendorNameUnknown Test of ensureVendorIDVendorNameExists(self), special case.
Method testEnsureVendorIDVendorNameExistsVendorPCI Test of ensureVendorIDVendorNameExists(self), PCI bus.
Method testEnsureVendorIDVendorNameExistsVendorPCCARD Test of ensureVendorIDVendorNameExists(self), PCCARD bus.
Method testEnsureVendorIDVendorNameExistVendorUSB Test of ensureVendorIDVendorNameExists(self), USB bus.
Method testEnsureVendorIDVendorNameExistVendorSCSI Test of ensureVendorIDVendorNameExists(self), SCSI bus.
Method testCreateDBDataForSimpleDevice Test of HALDevice.createDBData.
Method testCreateDBDataForDeviceWithOneDriver Test of HALDevice.createDBData.
Method testCreateDBDataForDeviceWithTwoDrivers Test of HALDevice.createDBData.
Method createSubmissionData Create a submission.
Method getSampleData Return the submission data of a short valid submission.
Method assertSampleDeviceCreated Assert that data for the device exists in HWDB tables.
Method assertAllSampleDevicesCreated Assert that the devices from the sample submission are processed.
Method testProcessSubmissionValidData Test of SubmissionParser.processSubmission().
Method testProcessSubmissionValidBzip2CompressedData Test of SubmissionParser.processSubmission().
Method testProcessSubmissionInvalidData Test of SubmissionParser.processSubmission().
Method testProcessSubmissionInconsistentData Test of SubmissionParser.processSubmission().
Method test_processSubmission_udev_data Test of SubmissionParser.processSubmission().
Method test_processSubmission_buildDeviceList_failing Test of SubmissionParser.processSubmission().
Method testProcessSubmissionRealData Test of SubmissionParser.processSubmission().
Method test_root_device Test o SubmissionParser.root_device.
Method testPendingSubmissionProcessing Test of process_pending_submissions().
Method testOopsLogging Test if OOPSes are properly logged.
Method testProcessingLoopExceptionHandling Test of the exception handling of ProcessingLoop.__call__()

Inherited from TestCaseHWDB:

Method assertWarningMessage Search for message in the log entries for submission_key.
Method assertErrorMessage Search for log_message in the log entries for submission_key.

Inherited from TestCase (via TestCaseHWDB):

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.
def setUp(self):
Setup the test environment.
def getLogData(self):
Undocumented
def setHALDevices(self, devices):
Undocumented
def testGetDriverNoDriverInfo(self):
Test of HALDevice.getDriver().
def testGetDriverWithDriverInfo(self):
Test of HALDevice.getDriver().
def testEnsureVendorIDVendorNameExistsRegularCase(self):
Test of ensureVendorIDVendorNameExists(self), regular case.
def runTestEnsureVendorIDVendorNameExistsVendorNameUnknown(self, devices, test_bus, test_vendor_id, test_udi):
Test of ensureVendorIDVendorNameExists(self), special case.

A HWVendorID record is not created by HALDevice.ensureVendorIDVendorNameExists for certain buses.

def testEnsureVendorIDVendorNameExistsVendorPCI(self):
Test of ensureVendorIDVendorNameExists(self), PCI bus.
def testEnsureVendorIDVendorNameExistsVendorPCCARD(self):
Test of ensureVendorIDVendorNameExists(self), PCCARD bus.
def testEnsureVendorIDVendorNameExistVendorUSB(self):
Test of ensureVendorIDVendorNameExists(self), USB bus.
def testEnsureVendorIDVendorNameExistVendorSCSI(self):
Test of ensureVendorIDVendorNameExists(self), SCSI bus.
def testCreateDBDataForSimpleDevice(self):
Test of HALDevice.createDBData.

Test for a HAL device without driver data.

def testCreateDBDataForDeviceWithOneDriver(self):
Test of HALDevice.createDBData.

Test of a HAL device with one driver.

def testCreateDBDataForDeviceWithTwoDrivers(self):
Test of HALDevice.createDBData.

Test for a HAL device with two drivers.

def createSubmissionData(self, data, compress, submission_key, private=False):
Create a submission.
def getSampleData(self, filename):
Return the submission data of a short valid submission.
def assertSampleDeviceCreated(self, bus, vendor_id, product_id, driver_name, submission):
Assert that data for the device exists in HWDB tables.
def assertAllSampleDevicesCreated(self, submission):
Assert that the devices from the sample submission are processed.

The test data contains two devices: A system and a PCI device. The system has no associated drivers; the PCI device is associated with the ahci driver.

def testProcessSubmissionValidData(self):
Test of SubmissionParser.processSubmission().

Regular case: Process valid compressed submission data.

def testProcessSubmissionValidBzip2CompressedData(self):
Test of SubmissionParser.processSubmission().

Regular case: Process valid compressed submission data.

def testProcessSubmissionInvalidData(self):
Test of SubmissionParser.processSubmission().

If a submission contains formally invalid data, it is rejected.

def testProcessSubmissionInconsistentData(self):
Test of SubmissionParser.processSubmission().

If a submission contains inconsistent data, it is rejected.

def test_processSubmission_udev_data(self):
Test of SubmissionParser.processSubmission().

Variant with udev data.

def test_processSubmission_buildDeviceList_failing(self):
Test of SubmissionParser.processSubmission().

If the method buildDeviceList() fails for a submission, it is rejected.

def testProcessSubmissionRealData(self):
Test of SubmissionParser.processSubmission().

Test with data from a real submission.

def test_root_device(self):
Test o SubmissionParser.root_device.
def testPendingSubmissionProcessing(self):
Test of process_pending_submissions().

Run process_pending_submissions with three submissions; one of the submisisons contains invalid data.

def testOopsLogging(self):
Test if OOPSes are properly logged.
def testProcessingLoopExceptionHandling(self):
Test of the exception handling of ProcessingLoop.__call__()
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.