Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(20)  |  Call(16)  |  Derive(0)  |  Import(4)

src/c/e/celery-3.1.11/celery/tests/backends/test_couchbase.py   celery(Download)
from __future__ import absolute_import
 
from celery.backends import couchbase as module
from celery.backends.couchbase import CouchBaseBackend
from celery.exceptions import ImproperlyConfigured
    def setup(self):
        if couchbase is None:
            raise SkipTest('couchbase is not installed.')
        self.backend = CouchBaseBackend(app=self.app)
 
        try:
            with self.assertRaises(ImproperlyConfigured):
                CouchBaseBackend(app=self.app)
        finally:
            module.couchbase = prev
    def test_init_no_settings(self):
        """test init no settings"""
        self.app.conf.CELERY_COUCHBASE_BACKEND_SETTINGS = []
        with self.assertRaises(ImproperlyConfigured):
            CouchBaseBackend(app=self.app)
 
    def test_init_settings_is_None(self):
        """Test init settings is None"""
        self.app.conf.CELERY_COUCHBASE_BACKEND_SETTINGS = None
        CouchBaseBackend(app=self.app)

src/c/e/celery-HEAD/celery/tests/backends/test_couchbase.py   celery(Download)
from __future__ import absolute_import
 
from celery.backends import couchbase as module
from celery.backends.couchbase import CouchBaseBackend
from celery.exceptions import ImproperlyConfigured
    def setup(self):
        if couchbase is None:
            raise SkipTest('couchbase is not installed.')
        self.backend = CouchBaseBackend(app=self.app)
 
        try:
            with self.assertRaises(ImproperlyConfigured):
                CouchBaseBackend(app=self.app)
        finally:
            module.couchbase = prev
    def test_init_no_settings(self):
        """test init no settings"""
        self.app.conf.CELERY_COUCHBASE_BACKEND_SETTINGS = []
        with self.assertRaises(ImproperlyConfigured):
            CouchBaseBackend(app=self.app)
 
    def test_init_settings_is_None(self):
        """Test init settings is None"""
        self.app.conf.CELERY_COUCHBASE_BACKEND_SETTINGS = None
        CouchBaseBackend(app=self.app)