Skip to content
Permalink
Browse files

methods are bytes

  • Loading branch information...
meejah committed Jun 17, 2019
1 parent 1fc7689 commit 5d7ebea5086f361efe7f14aea58e512a04b401f3
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/test_controller.py
@@ -1060,7 +1060,7 @@ def test_web_agent_defaults(self):
print("Skipping; appears we don't have web support")
return

resp = yield agent.request('GET', b'meejah.ca')
resp = yield agent.request(b'GET', b'meejah.ca')
self.assertEqual(self.expected_response, resp)

@defer.inlineCallbacks
@@ -1074,7 +1074,7 @@ def test_web_agent_deferred(self):
tor = Tor(reactor, proto, _tor_config=cfg)
agent = tor.web_agent(pool=self.pool, socks_endpoint=socks_d)

resp = yield agent.request('GET', b'meejah.ca')
resp = yield agent.request(b'GET', b'meejah.ca')
self.assertEqual(self.expected_response, resp)

@defer.inlineCallbacks
@@ -1089,7 +1089,7 @@ def test_web_agent_endpoint(self):
tor = Tor(reactor, proto, _tor_config=cfg)
agent = tor.web_agent(pool=self.pool, socks_endpoint=socks)

resp = yield agent.request('GET', b'meejah.ca')
resp = yield agent.request(b'GET', b'meejah.ca')
self.assertEqual(self.expected_response, resp)

@defer.inlineCallbacks
@@ -1102,7 +1102,7 @@ def test_web_agent_error(self):
tor = Tor(reactor, proto, _tor_config=cfg)
with self.assertRaises(ValueError) as ctx:
agent = tor.web_agent(pool=self.pool, socks_endpoint=object())
yield agent.request('GET', b'meejah.ca')
yield agent.request(B'GET', b'meejah.ca')
self.assertTrue("'socks_endpoint' should be" in str(ctx.exception))


0 comments on commit 5d7ebea

Please sign in to comment.
You can’t perform that action at this time.