summaryrefslogtreecommitdiffstats
path: root/tests/QtNetwork/http_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtNetwork/http_test.py')
-rw-r--r--tests/QtNetwork/http_test.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/QtNetwork/http_test.py b/tests/QtNetwork/http_test.py
index ee6eeea..b6bfea5 100644
--- a/tests/QtNetwork/http_test.py
+++ b/tests/QtNetwork/http_test.py
@@ -16,18 +16,24 @@ class HttpSignalsCase(UsesQCoreApplication):
super(HttpSignalsCase, self).setUp()
self.httpd = TestServer()
self.httpd.start()
- self.http = QHttp('localhost' , self.httpd.port())
+ self.http = QHttp("127.0.0.1" , self.httpd.port())
self.called = False
def tearDown(self):
- self.httpd.shutdown()
+ if self.httpd:
+ self.httpd.shutdown()
+ del self.httpd
self.http = None
self.httpd = None
super(HttpSignalsCase, self).tearDown()
+ def goAway(self):
+ self.httpd.shutdown()
+ self.app.quit()
+
def callback(self, ident):
self.called = True
- self.app.quit()
+ self.goAway()
def testDefaultArgs(self):
#QHttp signal requestStarted signal