diff tests/test_directory_server.txt @ 29:d8b73d9b679d

separate testing fileapp to its own doctest file
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 05 Mar 2012 13:27:06 -0800
parents 4509330ef8ad
children
line wrap: on
line diff
--- a/tests/test_directory_server.txt	Mon Mar 05 13:24:10 2012 -0800
+++ b/tests/test_directory_server.txt	Mon Mar 05 13:27:06 2012 -0800
@@ -1,5 +1,5 @@
-Test FileServer
-===============
+Test Directory Server
+=====================
 
 The obligatory imports::
 
@@ -8,19 +8,6 @@
     >>> import urlparse
     >>> from paste.fixture import TestApp
 
-Make a single file server::
-
-    >>> filename = os.path.join(here, 'example', 'helloworld.txt')
-    >>> os.path.exists(filename)
-    True
-    >>> app = fileserver.FileApp(filename)
-    >>> testapp = TestApp(app)
-    >>> response = testapp.get('/')
-    >>> response.status
-    200
-    >>> response.body == file(filename).read()
-    True
-
 Make a directory server::
 
     >>> directory = os.path.join(here, 'example')
@@ -42,6 +29,7 @@
     >>> response = testapp.get('/helloworld.txt')
     >>> response.status
     200
+    >>> filename = os.path.join(here, 'example', 'helloworld.txt')
     >>> response.body == file(filename).read()
     True