diff options
| author | Jay Oster | 2014-07-19 00:36:47 -0700 | 
|---|---|---|
| committer | Jay Oster | 2014-07-19 00:36:47 -0700 | 
| commit | 0f9e9755e5fad68dd33631edca6a62cbef4274af (patch) | |
| tree | c964501835d5c92068bfa15f334d5b641f9f5da0 | |
| parent | 199171015615f973605f6ae06cb0494e70382a85 (diff) | |
| download | pubnub-python-0f9e9755e5fad68dd33631edca6a62cbef4274af.tar.bz2 | |
DataSync unit tests: Add more doc comments for code clarity.
| -rw-r--r-- | tests/test_simple_datasync.py | 17 | 
1 files changed, 12 insertions, 5 deletions
| diff --git a/tests/test_simple_datasync.py b/tests/test_simple_datasync.py index 5bbf7c0..9b170e2 100644 --- a/tests/test_simple_datasync.py +++ b/tests/test_simple_datasync.py @@ -44,8 +44,7 @@ class TestSimpleDataSync():              async.set()          p.get_synced_object(object_id, callback) -        async.wait() -        async.clear() +        self.wait(async)      def tearDown(self, async):          """ @@ -62,14 +61,19 @@ class TestSimpleDataSync():          p.publish(channel="pn_dstr_" + object_id, message={ 'trans_id' : -1 })      def wait(self, async): +        """ +        Wait for the threading.Event object to be set, then clear it for any +        following async operations. +        """ +          async.wait()          async.clear() -      @asyncTest      def test_set(self, async): -        now = time.time() +        """Set object data with PUT.""" +        now = time.time()          p.set(object_id, {              "time" : now          }) @@ -80,8 +84,9 @@ class TestSimpleDataSync():      @asyncTest      def test_merge(self, async): -        now = time.time() +        """Update object data with PATCH.""" +        now = time.time()          p.merge(object_id, {              "time" : now          }) @@ -92,6 +97,8 @@ class TestSimpleDataSync():      @asyncTest      def test_delete(self, async): +        """Delete object data with DELETE.""" +          p.delete(object_id)          self.wait(async) | 
