Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added basic Bucket.view() test

This is going to be refactored later to use the
DesignDoc/View API, but testing it here for future
regression handling.

Change-Id: I6b89fac5d25a51315fd108e2154e0559b7f8ee41
Reviewed-on: http://review.couchbase.org/20124
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Benjamin Young <benjamin@couchbase.com>
  • Loading branch information...
commit fad95e284277af34cf74f61b6cc93aded2790da1 1 parent 874808d
@BigBlueHat BigBlueHat authored BigBlueHat committed
Showing with 17 additions and 0 deletions.
  1. +17 −0 couchbase/tests/test_client.py
View
17 couchbase/tests/test_client.py
@@ -260,6 +260,23 @@ def test_setitem(self):
self.client.delete(key)
@attr(cbv="2.0.0")
+ def test_view(self):
+ design_doc = {"views":
+ {"testing":
+ {"map":
+ "function(doc) { emit(doc.name, doc.num); }"
+ }
+ }
+ }
+ rest = self.client.server._rest()
+ if rest.couch_api_base is None:
+ raise SkipTest
+ rest.create_design_doc(self.client.name, 'test_ddoc',
+ json.dumps(design_doc))
+ results = self.client.view('_design/test_ddoc/_view/testing')
+ self.assertIsInstance(results, types.ListType)
+
+ @attr(cbv="2.0.0")
def test_design_docs(self):
doc_names = []
# set up some docs we can find
Please sign in to comment.
Something went wrong with that request. Please try again.