from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
    import gevent
except ImportError as e:
    raise SkipTest(e)

from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes

class GEventImplMixin(ApiImplementationMixin):
    factory = Bucket
    viewfactor = GView
    should_check_refcount = False


skiplist = ('ConnectionIopsTest', 'LockmodeTest', 'ConnectionPipelineTest')

configured_classes = get_configured_classes(GEventImplMixin,
                                            skiplist=skiplist)
globals().update(configured_classes)

from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
    import gevent
except ImportError as e:
    raise SkipTest(e)

from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes

class GEventImplMixin(ApiImplementationMixin):
    factory = Bucket
    viewfactor = GView
    should_check_refcount = False


skiplist = ('ConnectionIopsTest', 'LockmodeTest', 'ConnectionPipelineTest')

configured_classes = get_configured_classes(GEventImplMixin,
                                            skiplist=skiplist)

# View iterator test no longer works because of missing include_docs
def viter_skipfn(*args):
    raise SkipTest("include_docs not provided on client, "
                   "and no longer supported by server")


for n in ('test_include_docs', 'test_row_processor'):
    setattr(configured_classes['ViewIteratorTest_Bucket'], n, viter_skipfn)

globals().update(configured_classes)

Disable include_docs test for GCouchbase
Disable include_docs test for GCouchbase

The gevent api cannot cleanly use include_docs here; previously we
relied on the server to retrieve this, but the server no longer supports
this. Perhaps in some future time we can implement this within
libcouchbase itself, but until then, it's left unimplemented.

Change-Id: I1dc5cf86b4b063d251363f3d5fa14c8d29e8e6c1
Reviewed-on: http://review.couchbase.org/44149
Tested-by: Mark Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>
Reviewed-by: Volker Mische <fb414f8ac0dbbf87663550ae4ef5fc95b1041941@gmail.com>

  from couchbase.tests.base import ApiImplementationMixin, SkipTest
  try:
      import gevent
  except ImportError as e:
      raise SkipTest(e)
  
  from gcouchbase.bucket import Bucket, GView
  from couchbase.tests.importer import get_configured_classes
  
  class GEventImplMixin(ApiImplementationMixin):
      factory = Bucket
      viewfactor = GView
      should_check_refcount = False
  
  
  skiplist = ('ConnectionIopsTest', 'LockmodeTest', 'ConnectionPipelineTest')
  
  configured_classes = get_configured_classes(GEventImplMixin,
                                              skiplist=skiplist)
+ 
+ # View iterator test no longer works because of missing include_docs
+ def viter_skipfn(*args):
+     raise SkipTest("include_docs not provided on client, "
+                    "and no longer supported by server")
+ 
+ 
+ for n in ('test_include_docs', 'test_row_processor'):
+     setattr(configured_classes['ViewIteratorTest_Bucket'], n, viter_skipfn)
+ 
  globals().update(configured_classes)
  
Disable include_docs test for GCouchbase
## Code Before:
from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
    import gevent
except ImportError as e:
    raise SkipTest(e)

from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes

class GEventImplMixin(ApiImplementationMixin):
    factory = Bucket
    viewfactor = GView
    should_check_refcount = False


skiplist = ('ConnectionIopsTest', 'LockmodeTest', 'ConnectionPipelineTest')

configured_classes = get_configured_classes(GEventImplMixin,
                                            skiplist=skiplist)
globals().update(configured_classes)

## Instruction:
Disable include_docs test for GCouchbase
## Code After:
from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
    import gevent
except ImportError as e:
    raise SkipTest(e)

from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes

class GEventImplMixin(ApiImplementationMixin):
    factory = Bucket
    viewfactor = GView
    should_check_refcount = False


skiplist = ('ConnectionIopsTest', 'LockmodeTest', 'ConnectionPipelineTest')

configured_classes = get_configured_classes(GEventImplMixin,
                                            skiplist=skiplist)

# View iterator test no longer works because of missing include_docs
def viter_skipfn(*args):
    raise SkipTest("include_docs not provided on client, "
                   "and no longer supported by server")


for n in ('test_include_docs', 'test_row_processor'):
    setattr(configured_classes['ViewIteratorTest_Bucket'], n, viter_skipfn)

globals().update(configured_classes)
