Skip to content

Commit

Permalink
Test that Proxy creates the agent instance in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeas Moravec committed Jan 24, 2013
1 parent 0564cb1 commit af365dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_client.py
Expand Up @@ -6,6 +6,7 @@
from twisted.internet.defer import Deferred
from twisted.web.server import Site
from twisted.internet import reactor
from twisted.web.client import Agent

from fastjsonrpc.client import ReceiverProtocol
from fastjsonrpc.client import StringProducer
Expand Down Expand Up @@ -118,6 +119,11 @@ def test_init(self):
self.assertEquals(proxy.url, url)
self.assertEquals(proxy.version, version)

def test_init_agent(self):
proxy = Proxy('', '')

self.assertTrue(isinstance(proxy.agent, Agent))

def test_bodyFromResponseProtocolBody(self):
data = 'some random string'

Expand Down

0 comments on commit af365dd

Please sign in to comment.