Skip to content

Commit

Permalink
added pickling test to close PYCBC-10
Browse files Browse the repository at this point in the history
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
BigBlueHat authored and Benjamin Young committed Sep 1, 2012
1 parent 2234780 commit 24bd252
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions couchbase/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 24bd252

Please sign in to comment.