Skip to content
Browse files

added pickling test to close PYCBC-10

Change-Id: I99a99e0dafc47756e1f8aedb77b2c51afe4902aa
Reviewed-on: http://review.couchbase.org/20376
Reviewed-by: Benjamin Young <benjamin@couchbase.com>
Tested-by: Benjamin Young <benjamin@couchbase.com>
  • Loading branch information...
1 parent 2234780 commit 24bd2527c68490c6c45e1198ad3ae2c21a85dc25 @BigBlueHat BigBlueHat committed with BigBlueHat Aug 30, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 couchbase/tests/test_client.py
View
18 couchbase/tests/test_client.py
@@ -386,6 +386,24 @@ def test_flush(self):
self.assertTrue(self.cb['memcached'].flush())
rest.delete_bucket('memcached')
+ @attr(cbv="2.0.0")
+ def test_pickling(self):
+ pm = PickleMe()
+ self.client['test_pickling'] = pm
+ self.assertEqual(self.client['test_pickling'][2].say_hi(), "Hi Pickle Me")
+
+
+class PickleMe(object):
+ """Completely useless little class used in the BucketTest.test_pickling()
+ test above.
+ """
+ def __init__(self):
+ self.name = "Pickle Me"
+ self.number = 10
+
+ def say_hi(self):
+ return "Hi " + self.name
+
class DesignDocTest(Base):
def setUp(self):

0 comments on commit 24bd252

Please sign in to comment.
Something went wrong with that request. Please try again.