Example #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
     assert x.set(sentinel.key, sentinel.value) is None
Example #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))
Example #3
0
 def test_set_expires(self):
     self.app.conf.couchbase_backend_settings = None
     x = CouchbaseBackend(app=self.app, expires=30)
     assert x.expires == 30
     x._connection = MagicMock()
     x._connection.set = MagicMock()
     # should return None
     assert x.set(sentinel.key, sentinel.value, states.SUCCESS) is None