예제 #1
0
    def __init__(self, dirname, port, url):
        FunctionalTestEnvironment.__init__(self, dirname, port, url)
        self.smtp_port = self.port + os.getpid() % 1000
        self.smtpd = AcctMgrSMTPThreadedServer(self.smtp_port)

        config = self.get_trac_environment().config
        # Enabled Account Manager
        config.set('components', 'acct_mgr.*', 'enabled')
        # Disable trac's LoginModule
        config.set('components', 'trac.web.auth.LoginModule', 'disabled')
        # Setup Account Manager
        config.set('account-manager', 'password_file', self.htpasswd)
        config.set('account-manager', 'password_format', 'htpasswd')
        config.set('account-manager', 'password_store', 'HtPasswdStore')
        # Setup Notification
        config.set('notification', 'smtp_enabled', 'true')
        config.set('notification', 'smtp_from',
                   'testenv%s@localhost' % self.port)
        config.set('notification', 'smtp_port', self.smtp_port)
        config.set('notification', 'smtp_server', 'localhost')
        config.set('project', 'url', self.url)
        config.set('project', 'admin', 'testenv%s@localhost' % self.port)
        config.set('trac', 'base_url', self.url)

        config.save()
예제 #2
0
파일: testenv.py 프로젝트: AshKash/kit-sink
 def __init__(self, dirname, port, url):
     FunctionalTestEnvironment.__init__(self, dirname, port, url)
     self.smtp_port = self.port + os.getpid() % 1000
     self.smtpd = AcctMgrSMTPThreadedServer(self.smtp_port)
     
     config = self.get_trac_environment().config
     # Enabled Account Manager
     config.set('components', 'acct_mgr.*', 'enabled')
     # Disable trac's LoginModule
     config.set('components', 'trac.web.auth.LoginModule', 'disabled')
     # Setup Account Manager
     config.set('account-manager', 'password_file', self.htpasswd)
     config.set('account-manager', 'password_format', 'htpasswd')
     config.set('account-manager', 'password_store', 'HtPasswdStore')
     # Setup Notification
     config.set('notification', 'smtp_enabled', 'true')
     config.set('notification', 'smtp_from', 'testenv%s@localhost' % self.port)
     config.set('notification', 'smtp_port', self.smtp_port)
     config.set('notification', 'smtp_server', 'localhost')
     config.set('project', 'url', self.url)
     config.set('project', 'admin', 'testenv%s@localhost' % self.port)
     config.set('trac', 'base_url', self.url)
            
     config.save()
예제 #3
0
 def stop(self):
     FunctionalTestEnvironment.stop(self)
     self.smtpd.stop()
예제 #4
0
파일: testenv.py 프로젝트: AshKash/kit-sink
 def stop(self):
     FunctionalTestEnvironment.stop(self)
     self.smtpd.stop()