diff options
| author | Devendra | 2013-07-12 10:14:21 +0530 | 
|---|---|---|
| committer | Devendra | 2013-07-12 10:14:21 +0530 | 
| commit | 6616acbec40ac039b7bdabf7e8b3581e68c0b2cb (patch) | |
| tree | 3768b67e046aef37790c12f774838e539ac25a80 /common | |
| parent | 523802043bf1ce3616d3bac382f166e34984d5bf (diff) | |
| download | pubnub-python-6616acbec40ac039b7bdabf7e8b3581e68c0b2cb.tar.bz2 | |
adding common test from tornado and twisted
Diffstat (limited to 'common')
| -rw-r--r-- | common/PubnubBase.py | 2 | ||||
| -rw-r--r-- | common/PubnubCore.py | 2 | ||||
| -rw-r--r-- | common/PubnubCoreAsync.py | 13 | ||||
| -rw-r--r-- | common/PubnubCrypto.py | 2 | ||||
| -rw-r--r-- | common/unit-test-async.py | 1 | 
5 files changed, 9 insertions, 11 deletions
| diff --git a/common/PubnubBase.py b/common/PubnubBase.py index b5da9fa..0c4efef 100644 --- a/common/PubnubBase.py +++ b/common/PubnubBase.py @@ -6,7 +6,7 @@  ## http://www.pubnub.com/  ## ----------------------------------- -## PubNub 3.3.2 Real-time Push Cloud API +## PubNub 3.3.4 Real-time Push Cloud API  ## -----------------------------------  try: import json diff --git a/common/PubnubCore.py b/common/PubnubCore.py index 9b32de7..5965740 100644 --- a/common/PubnubCore.py +++ b/common/PubnubCore.py @@ -6,7 +6,7 @@  ## http://www.pubnub.com/  ## ----------------------------------- -## PubNub 3.3.2 Real-time Push Cloud API +## PubNub 3.3.4 Real-time Push Cloud API  ## -----------------------------------  try: import json diff --git a/common/PubnubCoreAsync.py b/common/PubnubCoreAsync.py index 5b8d130..8150bde 100644 --- a/common/PubnubCoreAsync.py +++ b/common/PubnubCoreAsync.py @@ -6,7 +6,7 @@  ## http://www.pubnub.com/  ## ----------------------------------- -## PubNub 3.3.2 Real-time Push Cloud API +## PubNub 3.3.4 Real-time Push Cloud API  ## -----------------------------------  import sys  import json @@ -142,16 +142,15 @@ class PubnubCoreAsync(PubnubBase):                  return              def sub_callback(response): -                print response -                response = json.loads(response) +                if not self.subscriptions[channel]['first'] : +                    self.subscriptions[channel]['first'] = True +                    connectcb() +                  ## STOP CONNECTION?                  if not self.subscriptions[channel]['connected']:                      return -                ## CONNECTED CALLBACK -                if not self.subscriptions[channel]['first'] : -                    self.subscriptions[channel]['first'] = True -                    connectcb() +                  ## PROBLEM?                  if not response: diff --git a/common/PubnubCrypto.py b/common/PubnubCrypto.py index b452765..b91e2d9 100644 --- a/common/PubnubCrypto.py +++ b/common/PubnubCrypto.py @@ -6,7 +6,7 @@  ## http://www.pubnub.com/  ## ----------------------------------- -## PubNub 3.3.2 Real-time Push Cloud API +## PubNub 3.3.4 Real-time Push Cloud API  ## -----------------------------------  from Crypto.Cipher import AES diff --git a/common/unit-test-async.py b/common/unit-test-async.py index 258bf6a..89a828e 100644 --- a/common/unit-test-async.py +++ b/common/unit-test-async.py @@ -93,7 +93,6 @@ def test_subscribe():              'callback' : publish_cb          })      def subscribe_cb(response): -        print response          test(response == message , 'Subscribe Receive Test in subscribe Callback')      pubnub.subscribe({          'channel' : crazy, | 
