예제 #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))