From 6616acbec40ac039b7bdabf7e8b3581e68c0b2cb Mon Sep 17 00:00:00 2001 From: Devendra Date: Fri, 12 Jul 2013 10:14:21 +0530 Subject: adding common test from tornado and twisted --- python-twisted/Makefile | 2 +- python-twisted/Pubnub.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'python-twisted') 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) -- cgit v1.2.3