def setUp(self): TestCase.setUp(self) self.tarfile_path = "/tmp/_verify_extract" self.tarfile_name = os.path.join(self.tarfile_path, "test_tarfile.tar") self.custom_processor = CustomUpload() self.custom_processor.tmpdir = self.makeTemporaryDirectory() self.custom_processor.tarfile_path = self.tarfile_name
def setUp(self): TestCase.setUp(self) self.original_handler = signal.getsignal(signal.SIGHUP) self.addCleanup(signal.signal, signal.SIGHUP, self.original_handler) sighup.setup_sighup(None) self.original_flag = haproxy.going_down_flag self.addCleanup(haproxy.set_going_down_flag, self.original_flag)
def setUp(self): TestCase.setUp(self) logger = logging.getLogger(self.factory.getUniqueString()) logger.setLevel(logging.DEBUG) self.logger = logger @adapter(ILoggingEvent) def _log_event(event): logger.log(event.level, event.message) provideHandler(_log_event) self.addCleanup(getGlobalSiteManager().unregisterHandler, _log_event)
def setUp(self): TestCase.setUp(self) self.intercepted = [] self.session = None self.root = app = SimpleLogInRootApp(SESSION_VAR) app = session_scribbler(app, self) app = HTTPExceptionHandler(app) app = SessionHandler(app, SESSION_VAR, SECRET) self.cookie_name = app.cookie_handler.cookie_name self.intercept(config.codehosting.codebrowse_root, app) self.intercept(config.codehosting.secure_codebrowse_root, app) self.intercept(allvhosts.configs['mainsite'].rooturl, dummy_destination) install_opener() self.browser = wsgi_intercept.zope_testbrowser.WSGI_Browser() # We want to pretend we are not a robot, or else mechanize will honor # robots.txt. self.browser.mech_browser.set_handle_robots(False) self.browser.open( config.codehosting.secure_codebrowse_root + '+login')
def setUp(self): TestCase.setUp(self) self.logger = BufferLogger()
def setUp(self): TestCase.setUp(self) self.http = HTTPCaller() self.original_flag = haproxy.going_down_flag self.addCleanup(haproxy.set_going_down_flag, self.original_flag)
def setUp(self): TestCase.setUp(self) self.field = BranchURIField()
def setUp(self): TestCase.setUp(self) self._num_task_producer_calls = 0 self._default_task_consumer = NoopTaskConsumer()
def setUp(self): TestCase.setUp(self) UserAuthServerMixin.setUp(self)
def tearDown(self): self.user_auth.serviceStopped() TestCase.tearDown(self)
def setUp(self): TestCase.setUp(self) login(ANONYMOUS) self.addCleanup(logout) self.person_set = getUtility(IPersonSet)
def tearDown(self): TestCase.tearDown(self) cleanUp()
def setUp(self): TestCase.setUp(self) login('*****@*****.**') self.factory = LaunchpadObjectFactory()
def setUp(self): TestCase.setUp(self) self.fake_time = FakeTime(12345) self.logger = BufferLogger()
def setUp(self): TestCase.setUp(self) login(ANONYMOUS)
def setUp(self): TestCase.setUp(self) self.sm = getSiteManager() self.context = AnyObject() self.request = LaunchpadTestRequest()
def tearDown(self): uninstall_opener() for host, port in self.intercepted: wsgi_intercept.remove_wsgi_intercept(host, port) TestCase.tearDown(self)
def setUp(self): TestCase.setUp(self) self.reactor = MockReactor() self.proc = MockProcessTransport('executable') sock = socket.socket() self.exiter = _WaitForExit(self.reactor, self.proc, sock)
def setUp(self): UserAuthServerMixin.setUp(self) TestCase.setUp(self) self.portal.registerChecker(MockChecker()) self.user_auth.serviceStarted() self.key_data = self._makeKey()
def setUp(self): TestCase.setUp(self) self.authserver = self.FakeAuthenticationEndpoint()
def tearDown(self): logout() TestCase.tearDown(self)
def setUp(self): TestCase.setUp(self) LaunchpadTransportTests.setUp(self)
def setUp(self): TestCase.setUp(self) frontend = InMemoryFrontend() self.factory = frontend.getLaunchpadObjectFactory() self.codehosting_endpoint = XMLRPCWrapper( frontend.getCodehostingEndpoint())
def setUp(self): TestCase.setUp(self) from lp.registry.scripts.productreleasefinder.walker import ( HTTPWalker) self.walker = HTTPWalker("http://localhost/")
def setUp(self): TestCase.setUp(self) self.pushConfig('codeimportdispatcher', forced_hostname='none')