mirror of
https://github.com/mirror/wget.git
synced 2025-01-27 21:00:31 +08:00
Move server classes to package server.protocol
delete mode 100644 testenv/FTPServer.py delete mode 100644 testenv/HTTPServer.py create mode 100644 testenv/server/__init__.py create mode 100644 testenv/server/ftp/__init__.py create mode 100644 testenv/server/ftp/ftp_server.py create mode 100644 testenv/server/http/__init__.py create mode 100644 testenv/server/http/http_server.py
This commit is contained in:
parent
195393bf41
commit
507383df07
@ -1,3 +1,13 @@
|
|||||||
|
2014-03-13 Zihang Chen <chsc4698@gmail.com>
|
||||||
|
|
||||||
|
* server: (new package) package for the server classes
|
||||||
|
* server.http: (new package) package for HTTP server
|
||||||
|
* server.ftp: (new package) package for FTP server
|
||||||
|
* HTTPServer.py: Move to server/http/http_server.py. Also change the
|
||||||
|
CERTFILE to '../certs/wget-cert.pem'.
|
||||||
|
* FTPServer.py: Move to server/ftp/ftp_server.py.
|
||||||
|
* WgetTest.py: Optimize import respect to the server classes.
|
||||||
|
|
||||||
2014-03-13 Zihang Chen <chsc4698@gmail.com>
|
2014-03-13 Zihang Chen <chsc4698@gmail.com>
|
||||||
|
|
||||||
* conf: (new package) package for rule classes and hook methods
|
* conf: (new package) package for rule classes and hook methods
|
||||||
|
@ -13,9 +13,9 @@ n tests simultaneously.
|
|||||||
Structure:
|
Structure:
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
* HTTPServer.py: This file contains a custom, programmatically configurable
|
* server: This package contains custom programmatically configurable servers
|
||||||
HTTP Server for testing Wget. It runs an instance of Python's http.server
|
(both HTTP and FTP) for testing Wget. The HTTP server runs an instance of
|
||||||
module.
|
Python's http.server module. The FTP server is to be implemented.
|
||||||
|
|
||||||
* WgetTest.py: This file contains various functions and global variables for
|
* WgetTest.py: This file contains various functions and global variables for
|
||||||
each instance of the server that is initiated. It includes functions to
|
each instance of the server that is initiated. It includes functions to
|
||||||
|
@ -3,7 +3,6 @@ import shutil
|
|||||||
import shlex
|
import shlex
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
import HTTPServer
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
@ -11,12 +10,12 @@ from misc.colour_terminal import print_red, print_green, print_blue
|
|||||||
from difflib import unified_diff
|
from difflib import unified_diff
|
||||||
from exc.test_failed import TestFailed
|
from exc.test_failed import TestFailed
|
||||||
import conf
|
import conf
|
||||||
|
from server.http import http_server
|
||||||
|
|
||||||
HTTP = "HTTP"
|
HTTP = "HTTP"
|
||||||
HTTPS = "HTTPS"
|
HTTPS = "HTTPS"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
""" Class that defines methods common to both HTTP and FTP Tests. """
|
""" Class that defines methods common to both HTTP and FTP Tests. """
|
||||||
|
|
||||||
class CommonMethods:
|
class CommonMethods:
|
||||||
@ -218,12 +217,12 @@ class HTTPTest (CommonMethods):
|
|||||||
self.hook_call(post_hook, 'Post Test Function')
|
self.hook_call(post_hook, 'Post Test Function')
|
||||||
|
|
||||||
def init_HTTP_Server (self):
|
def init_HTTP_Server (self):
|
||||||
server = HTTPServer.HTTPd ()
|
server = http_server.HTTPd ()
|
||||||
server.start ()
|
server.start ()
|
||||||
return server
|
return server
|
||||||
|
|
||||||
def init_HTTPS_Server (self):
|
def init_HTTPS_Server (self):
|
||||||
server = HTTPServer.HTTPSd ()
|
server = http_server.HTTPSd ()
|
||||||
server.start ()
|
server.start ()
|
||||||
return server
|
return server
|
||||||
|
|
||||||
|
1
testenv/server/__init__.py
Normal file
1
testenv/server/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
1
testenv/server/ftp/__init__.py
Normal file
1
testenv/server/ftp/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
1
testenv/server/http/__init__.py
Normal file
1
testenv/server/http/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
Loading…
Reference in New Issue
Block a user