示例#1
0
 def test_set(self):
     self.app.conf.couchbase_backend_settings = None
     x = CouchBaseBackend(app=self.app)
     x._connection = MagicMock()
     x._connection.set = MagicMock()
     # should return None
     self.assertIsNone(x.set(sentinel.key, sentinel.value))
示例#2
0
 def test_set(self):
     self.app.conf.couchbase_backend_settings = None
     x = CouchBaseBackend(app=self.app)
     x._connection = MagicMock()
     x._connection.set = MagicMock()
     # should return None
     self.assertIsNone(x.set(sentinel.key, sentinel.value))
示例#3
0
    def test_set(self):
        """test_set

        CouchBaseBackend.set should return None and take two params
        db conn to couchbase is mocked.

        """
        self.app.conf.CELERY_COUCHBASE_BACKEND_SETTINGS = None
        x = CouchBaseBackend(app=self.app)
        x._connection = MagicMock()
        x._connection.set = MagicMock()
        # should return None
        self.assertIsNone(x.set(sentinel.key, sentinel.value))
示例#4
0
    def test_set(self):
        """test_set

        CouchBaseBackend.set should return None and take two params
        db conn to couchbase is mocked.

        """
        self.app.conf.CELERY_COUCHBASE_BACKEND_SETTINGS = None
        x = CouchBaseBackend(app=self.app)
        x._connection = MagicMock()
        x._connection.set = MagicMock()
        # should return None
        self.assertIsNone(x.set(sentinel.key, sentinel.value))
示例#5
0
    def test_set(self):
        """
        Test set method.

        CouchBaseBackend.set should return None and take two params
        db conn to couchbase is mocked.
        """
        self.app.conf.couchbase_backend_settings = None
        x = CouchBaseBackend(app=self.app)
        x._connection = MagicMock()
        x._connection.set = MagicMock()
        # should return None
        self.assertIsNone(x.set(sentinel.key, sentinel.value))
示例#6
0
    def test_set(self):
        """
        Test set method.

        CouchBaseBackend.set should return None and take two params
        db conn to couchbase is mocked.
        """
        self.app.conf.couchbase_backend_settings = None
        x = CouchBaseBackend(app=self.app)
        x._connection = MagicMock()
        x._connection.set = MagicMock()
        # should return None
        self.assertIsNone(x.set(sentinel.key, sentinel.value))