Пример #1
0
    def setUp(self):
        super(ArchiverTestCase, self).setUp()

        handlers.celery_before_request()
        self.user = factories.UserFactory()
        self.auth = Auth(user=self.user)
        self.src = factories.NodeFactory(creator=self.user)
        self.dst = factories.RegistrationFactory(user=self.user, project=self.src, send_signals=False)
        archiver_utils.before_archive(self.dst, self.user)
        self.archive_job = self.dst.archive_job
Пример #2
0
    def setUp(self):
        super(ArchiverTestCase, self).setUp()

        handlers.celery_before_request()
        self.user = factories.UserFactory()
        self.auth = Auth(user=self.user)
        self.src = factories.NodeFactory(creator=self.user)
        self.dst = factories.RegistrationFactory(user=self.user, project=self.src, send_signals=False)
        archiver_utils.before_archive(self.dst, self.user)
        self.archive_job = self.dst.archive_job
Пример #3
0
 def setUp(self):
     super(AppTestCase, self).setUp()
     self.app = TestApp(test_app)
     if not self.PUSH_CONTEXT:
         return
     self.context = test_app.test_request_context()
     self.context.push()
     with self.context:
         celery_before_request()
     for signal in self.DISCONNECTED_SIGNALS:
         for receiver in self.DISCONNECTED_SIGNALS[signal]:
             signal.disconnect(receiver)
Пример #4
0
 def setUp(self):
     super(AppTestCase, self).setUp()
     self.app = TestApp(test_app)
     if not self.PUSH_CONTEXT:
         return
     self.context = test_app.test_request_context()
     self.context.push()
     with self.context:
         celery_before_request()
     for signal in self.DISCONNECTED_SIGNALS:
         for receiver in self.DISCONNECTED_SIGNALS[signal]:
             signal.disconnect(receiver)
Пример #5
0
 def setUp(self):
     super(AppTestCase, self).setUp()
     self.app = TestApp(test_app)
     if not self.PUSH_CONTEXT:
         return
     self.context = test_app.test_request_context(headers={
         'Remote-Addr': '146.9.219.56',
         'User-Agent': 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4.1) Gecko/20020518 Netscape6/6.2.3'
     })
     self.context.push()
     with self.context:
         celery_before_request()
     for signal in self.DISCONNECTED_SIGNALS:
         for receiver in self.DISCONNECTED_SIGNALS[signal]:
             signal.disconnect(receiver)
Пример #6
0
 def setUp(self):
     super(AppTestCase, self).setUp()
     self.app = TestApp(test_app)
     if not self.PUSH_CONTEXT:
         return
     self.context = test_app.test_request_context(headers={
         'Remote-Addr': '146.9.219.56',
         'User-Agent': 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4.1) Gecko/20020518 Netscape6/6.2.3'
     })
     self.context.push()
     with self.context:
         celery_before_request()
     for signal in self.DISCONNECTED_SIGNALS:
         for receiver in self.DISCONNECTED_SIGNALS[signal]:
             signal.disconnect(receiver)
Пример #7
0
 def process_request(self, request):
     celery_before_request()
Пример #8
0
 def tearDown(self):
     handlers.celery_before_request()
     super(TestOnPreprintUpdatedTask, self).tearDown()
Пример #9
0
 def tearDown(self):
     handlers.celery_before_request()
     super(TestOnPreprintUpdatedTask, self).tearDown()
Пример #10
0
 def setUp(self):
     super(TestUserMerging, self).setUp()
     self.user = factories.UserFactory()
     with self.context:
         handlers.celery_before_request()
Пример #11
0
 def process_request(self, request):
     celery_before_request()
Пример #12
0
 def setUp(self, *args, **kwargs):
     super(TestMailChimpHelpers, self).setUp(*args, **kwargs)
     with self.context:
         handlers.celery_before_request()
Пример #13
0
 def setUp(self, *args, **kwargs):
     super(TestMailChimpHelpers, self).setUp(*args, **kwargs)
     with self.context:
         handlers.celery_before_request()
Пример #14
0
 def setUp(self):
     super(TestUserMerging, self).setUp()
     self.user = factories.UserFactory()
     with self.context:
         handlers.celery_before_request()