Permalink
Browse files

re-arrange code

  • Loading branch information...
bevenky committed Aug 15, 2011
1 parent 23e1574 commit 0baf532be17be116a26be68b316008e205b4ac10
View
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2011 Plivo Team. See LICENSE for details.
+import os
+import sys
import unittest
@@ -23,8 +25,6 @@ def run():
if __name__ == '__main__':
- import os
- import sys
#sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, '.')
run()
@@ -29,8 +29,6 @@ class TestEvent(TestCase):
"""
-
-
def test_command_reply(self):
ev = Event(self.EVENT_COMMAND_REPLY)
self.assertEquals(ev.get_content_type(), "command/reply")
@@ -3,14 +3,15 @@
from unittest import TestCase
-from plivo.core.freeswitch.inboundsocket import InboundEventSocket
-from plivo.core.freeswitch.eventtypes import Event
-from plivo.core.errors import ConnectError
import gevent
from gevent import socket
from gevent import Timeout
from gevent.server import StreamServer
+from plivo.core.freeswitch.inboundsocket import InboundEventSocket
+from plivo.core.freeswitch.eventtypes import Event
+from plivo.core.errors import ConnectError
+
class TestClient(object):
'''
@@ -183,7 +184,7 @@ def event_plain(self, client, buff):
class TestInboundEventSocket(InboundEventSocket):
def __init__(self, host, port, password, filter='ALL', pool_size=500, connect_timeout=5):
- InboundEventSocket.__init__(self, host, port, password, filter, pool_size=pool_size,
+ InboundEventSocket.__init__(self, host, port, password, filter, pool_size=pool_size,
connect_timeout=connect_timeout, eventjson=False)
self.heartbeat_events = []
self.re_schedule_events = []

0 comments on commit 0baf532

Please sign in to comment.