aboutsummaryrefslogtreecommitdiffstats
path: root/python-twisted
diff options
context:
space:
mode:
authorDevendra2013-07-12 10:14:21 +0530
committerDevendra2013-07-12 10:14:21 +0530
commit6616acbec40ac039b7bdabf7e8b3581e68c0b2cb (patch)
tree3768b67e046aef37790c12f774838e539ac25a80 /python-twisted
parent523802043bf1ce3616d3bac382f166e34984d5bf (diff)
downloadpubnub-python-6616acbec40ac039b7bdabf7e8b3581e68c0b2cb.tar.bz2
adding common test from tornado and twisted
Diffstat (limited to 'python-twisted')
-rw-r--r--python-twisted/Makefile2
-rw-r--r--python-twisted/Pubnub.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/python-twisted/Makefile b/python-twisted/Makefile
index 4cd9305..13a5e5a 100644
--- a/python-twisted/Makefile
+++ b/python-twisted/Makefile
@@ -14,5 +14,5 @@ clean:
.PHONY: test
test:
- python tests/unit-test.py
+ python ../common/unit-test-async.py
diff --git a/python-twisted/Pubnub.py b/python-twisted/Pubnub.py
index e317a9c..8b29236 100644
--- a/python-twisted/Pubnub.py
+++ b/python-twisted/Pubnub.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
@@ -84,13 +84,12 @@ class Pubnub(PubnubCoreAsync):
request = agent.request( 'GET', url, Headers(self.headers), None )
def received(response):
- #print response
finished = Deferred()
response.deliverBody(PubNubResponse(finished))
return finished
def complete(data):
- callback(data)
+ callback(eval(data))
request.addCallback(received)
request.addBoth(complete)