From d8cb826361c2487ba7feb0c09669d6518d51c987 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 3 Feb 2011 12:16:03 +1300 Subject: Test suite rejiggering and cleanup. --- test/test_proxy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/test_proxy.py') diff --git a/test/test_proxy.py b/test/test_proxy.py index ea1c56aa..ff9ec4bb 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -1,7 +1,7 @@ import threading, urllib, Queue, urllib2, cStringIO import libpry import serv, sslserv -from libmproxy import proxy, controller, utils +from libmproxy import proxy, controller, utils, dump, script import random # Yes, the random ports are horrible. During development, sockets are often not @@ -196,6 +196,9 @@ class u_parse_url(libpry.AutoTree): s, h, po, pa = proxy.parse_url("http://foo") assert pa == "/" + s, h, po, pa = proxy.parse_url("https://foo") + assert po == 443 + class uConfig(libpry.AutoTree): def test_pem(self): @@ -210,6 +213,8 @@ class uFileLike(libpry.AutoTree): s.flush() assert s.readline() == "foobar\n" assert s.readline() == "foobar" + # Test __getattr__ + assert s.isatty class uRequest(libpry.AutoTree): -- cgit v1.2.3