Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1514

Show
Ignore:
Timestamp:
12/11/06 04:05:15
Author:
lawouach
Message:

The has space.html file is created and deleted during the test. This should help fixing #441

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/test/test_static.py

    r1311 r1514  
    44import os 
    55curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) 
     6has_space_filepath = os.path.join(curdir, 'static', 'has space.html') 
    67import threading 
    78 
    89import cherrypy 
    910 
    10  
    1111def setup_server(): 
     12    if not os.path.exists(has_space_filepath): 
     13        file(has_space_filepath, 'wb').write('Hello, world\r\n') 
     14         
    1215    class Root: 
    1316        pass 
     
    5255    cherrypy.config.update({'environment': 'test_suite'}) 
    5356 
     57def teardown_server(): 
     58    if os.path.exists(has_space_filepath): 
     59        try: 
     60            os.unlink(has_space_filepath) 
     61        except: 
     62            pass 
     63         
    5464from cherrypy.test import helper 
    5565 

Hosted by WebFaction

Log in as guest/cpguest to create tickets