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:
Zihang Chen 2014-03-13 18:51:54 +08:00 committed by Giuseppe Scrivano
parent 195393bf41
commit 507383df07
8 changed files with 19 additions and 7 deletions

View File

@ -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>
* conf: (new package) package for rule classes and hook methods

View File

@ -13,9 +13,9 @@ n tests simultaneously.
Structure:
================================================================================
* HTTPServer.py: This file contains a custom, programmatically configurable
HTTP Server for testing Wget. It runs an instance of Python's http.server
module.
* server: This package contains custom programmatically configurable servers
(both HTTP and FTP) for testing Wget. The HTTP server runs an instance of
Python's http.server module. The FTP server is to be implemented.
* WgetTest.py: This file contains various functions and global variables for
each instance of the server that is initiated. It includes functions to

View File

@ -3,7 +3,6 @@ import shutil
import shlex
import sys
import traceback
import HTTPServer
import re
import time
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 exc.test_failed import TestFailed
import conf
from server.http import http_server
HTTP = "HTTP"
HTTPS = "HTTPS"
""" Class that defines methods common to both HTTP and FTP Tests. """
class CommonMethods:
@ -218,12 +217,12 @@ class HTTPTest (CommonMethods):
self.hook_call(post_hook, 'Post Test Function')
def init_HTTP_Server (self):
server = HTTPServer.HTTPd ()
server = http_server.HTTPd ()
server.start ()
return server
def init_HTTPS_Server (self):
server = HTTPServer.HTTPSd ()
server = http_server.HTTPSd ()
server.start ()
return server

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@