Esempio n. 1
0
    def setUp(self):
        confBase = { 'sep': '/' }
        confA, confB = confBase.copy(), confBase.copy()

        confA['path'] = os.path.join(libcore.testingPath(), 'maildirs', 'recursive_A')
        confB['path'] = os.path.join(libcore.testingPath(), 'maildirs', 'recursive_B')

        self.driverA = loadDriver(drivers.Maildir, 'MaildirA', confA)
        self.driverB = loadDriver(drivers.Maildir, 'MaildirB', confB)
Esempio n. 2
0
    def setUp(self):
        confBase = {'sep': '/'}
        confA, confB = confBase.copy(), confBase.copy()

        confA['path'] = os.path.join(libcore.testingPath(), 'maildirs',
                                     'recursive_A')
        confB['path'] = os.path.join(libcore.testingPath(), 'maildirs',
                                     'recursive_B')

        self.driverA = loadDriver(drivers.Maildir, 'MaildirA', confA)
        self.driverB = loadDriver(drivers.Maildir, 'MaildirB', confB)
Esempio n. 3
0
    def fw_getDriver(self):
        """Chain the controllers on top of the driver.

        Controllers are run in the driver worker."""

        driver = loadDriver(self.driver, self.getClassName(), self.conf)

        # Chain the controllers.
        controllers = self.controllers # Keep the original attribute as-is.
        # Nearest to end-driver is the last in this list.
        controllers.reverse()
        for obj in controllers:
            controller = loadController(obj, self.getClassName())

            controller.fw_drive(driver) # Chain here.
            driver = controller # The next controller will drive this.

        return driver
Esempio n. 4
0
    def fw_getDriver(self) -> Driver:
        """Chain the controllers on top of the driver.

        Controllers are run in the driver worker."""

        driver = loadDriver(self.driver, self.getClassName(), self.conf)

        # Chain the controllers.
        # Keep the original attribute as-is.
        controllers = self.controllers.copy()
        # Nearest to end-driver is the last in this list.
        controllers.reverse()
        for obj in controllers:
            controller = loadController(obj, self.getClassName(), self.conf)

            controller.fw_drive(driver)  # Chain here.
            driver = controller  # The next controller will drive this.

        return driver