mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Start HTTP test only when calling begin().
* testenv/test/http_test.py: Move self.do_test() from __init__ to begin().
This commit is contained in:
parent
37b58e3976
commit
05c30c3b1b
@ -23,11 +23,13 @@ class HTTPTest(BaseTest):
|
|||||||
test_params,
|
test_params,
|
||||||
post_hook,
|
post_hook,
|
||||||
protocols)
|
protocols)
|
||||||
with self:
|
|
||||||
# if any exception occurs, self.__exit__ will be immediately called
|
|
||||||
self.server_setup()
|
self.server_setup()
|
||||||
|
|
||||||
|
def begin(self):
|
||||||
|
with self:
|
||||||
self.do_test()
|
self.do_test()
|
||||||
print_green('Test Passed.')
|
print_green('Test Passed.')
|
||||||
|
return super(HTTPTest, self).begin()
|
||||||
|
|
||||||
def instantiate_server_by(self, protocol):
|
def instantiate_server_by(self, protocol):
|
||||||
server = {HTTP: HTTPd,
|
server = {HTTP: HTTPd,
|
||||||
|
Loading…
Reference in New Issue
Block a user