[Twisted-web] Problems with web2.test.test_static.TestFileSaver
    Wilfredo Sánchez Vega 
    wsanchez at wsanchez.net
       
    Sun Nov  6 23:40:54 MST 2005
    
    
  
   web2.test.test_static.TestFileSaver has been failing on my DAV  
branch.  dreid and I were looking into it at SHDH and were generally  
baffled by the breakage.
   I remain baffled, but have managed to figure out that the test  
isn't breaking due to the addition of code, but by the simple  
existence of the test modules in my code.  I can reproduce the  
problem in trunk by doing the following:
	cd twisted/web2
	mkdir dav
	touch dav/__init__.py
	mkdir test
	touch dav/test/__init__.py
	echo "import twisted.web2.static" > dav/test/test_OPTIONS.py
   And then run "trial twisted.web2" and watch it blow up in  
TestFileSaver.
   In  
twisted.web2.test.test_static.TestFileSaver.testCompareFileContents 
(), when the callback gotFname() gets called, if the dav test is not  
present, then fname is being set to this string:
     fname = "y>\ntwisted.web2.test.test_static/TestFileSaver/ 
testCompareFileContents/2336.1/4eb6d0fcd8319ae61aa0639f3c4c1128: File  
type not allowed MimeType('text', 'plain', {})"
... which is apparently including some previous error condition which  
is being passed along in a strange sort of way.
	-wsv
    
    
More information about the Twisted-web
mailing list