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
Пример #2
0
    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)
Пример #3
0
    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)
Пример #4
0
 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()
Пример #6
0
 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)
Пример #7
0
 def setUp(self):
     TestCase.setUp(self)
     self.field = BranchURIField()
Пример #8
0
 def setUp(self):
     TestCase.setUp(self)
     self._num_task_producer_calls = 0
     self._default_task_consumer = NoopTaskConsumer()
Пример #9
0
 def setUp(self):
     TestCase.setUp(self)
     UserAuthServerMixin.setUp(self)
Пример #10
0
 def tearDown(self):
     self.user_auth.serviceStopped()
     TestCase.tearDown(self)
Пример #11
0
 def setUp(self):
     TestCase.setUp(self)
     login(ANONYMOUS)
     self.addCleanup(logout)
     self.person_set = getUtility(IPersonSet)
 def setUp(self):
     TestCase.setUp(self)
     self.field = BranchURIField()
Пример #13
0
 def tearDown(self):
     TestCase.tearDown(self)
     cleanUp()
Пример #14
0
 def setUp(self):
     TestCase.setUp(self)
     login('*****@*****.**')
     self.factory = LaunchpadObjectFactory()
Пример #15
0
 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)
Пример #16
0
 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()
Пример #19
0
 def setUp(self):
     TestCase.setUp(self)
     self.logger = BufferLogger()
Пример #20
0
 def tearDown(self):
     uninstall_opener()
     for host, port in self.intercepted:
         wsgi_intercept.remove_wsgi_intercept(host, port)
     TestCase.tearDown(self)
Пример #21
0
 def setUp(self):
     TestCase.setUp(self)
     self.reactor = MockReactor()
     self.proc = MockProcessTransport('executable')
     sock = socket.socket()
     self.exiter = _WaitForExit(self.reactor, self.proc, sock)
Пример #22
0
 def setUp(self):
     TestCase.setUp(self)
     self._num_task_producer_calls = 0
     self._default_task_consumer = NoopTaskConsumer()
Пример #23
0
 def setUp(self):
     TestCase.setUp(self)
     self.sm = getSiteManager()
     self.context = AnyObject()
     self.request = LaunchpadTestRequest()
Пример #24
0
 def setUp(self):
     UserAuthServerMixin.setUp(self)
     TestCase.setUp(self)
     self.portal.registerChecker(MockChecker())
     self.user_auth.serviceStarted()
     self.key_data = self._makeKey()
Пример #25
0
 def setUp(self):
     TestCase.setUp(self)
     login(ANONYMOUS)
Пример #26
0
 def setUp(self):
     TestCase.setUp(self)
     self.authserver = self.FakeAuthenticationEndpoint()
Пример #27
0
 def tearDown(self):
     logout()
     TestCase.tearDown(self)
Пример #28
0
 def setUp(self):
     TestCase.setUp(self)
     LaunchpadTransportTests.setUp(self)
Пример #29
0
 def tearDown(self):
     TestCase.tearDown(self)
     cleanUp()
Пример #30
0
 def setUp(self):
     TestCase.setUp(self)
     login('*****@*****.**')
     self.factory = LaunchpadObjectFactory()
Пример #31
0
 def tearDown(self):
     uninstall_opener()
     for host, port in self.intercepted:
         wsgi_intercept.remove_wsgi_intercept(host, port)
     TestCase.tearDown(self)
Пример #32
0
 def setUp(self):
     TestCase.setUp(self)
     frontend = InMemoryFrontend()
     self.factory = frontend.getLaunchpadObjectFactory()
     self.codehosting_endpoint = XMLRPCWrapper(
         frontend.getCodehostingEndpoint())
Пример #33
0
 def setUp(self):
     TestCase.setUp(self)
     self.reactor = MockReactor()
     self.proc = MockProcessTransport('executable')
     sock = socket.socket()
     self.exiter = _WaitForExit(self.reactor, self.proc, sock)
Пример #34
0
 def setUp(self):
     TestCase.setUp(self)
     frontend = InMemoryFrontend()
     self.factory = frontend.getLaunchpadObjectFactory()
     self.codehosting_endpoint = XMLRPCWrapper(
         frontend.getCodehostingEndpoint())
Пример #35
0
 def setUp(self):
     TestCase.setUp(self)
     from lp.registry.scripts.productreleasefinder.walker import (
         HTTPWalker)
     self.walker = HTTPWalker("http://localhost/")
Пример #36
0
 def setUp(self):
     TestCase.setUp(self)
     self.fake_time = FakeTime(12345)
     self.logger = BufferLogger()
 def tearDown(self):
     logout()
     TestCase.tearDown(self)
Пример #38
0
 def setUp(self):
     TestCase.setUp(self)
     self.pushConfig('codeimportdispatcher', forced_hostname='none')
Пример #39
0
 def setUp(self):
     TestCase.setUp(self)
     LaunchpadTransportTests.setUp(self)