示例#1
0
 def test_run_app(self):
     mw = StaticFileMiddleware(sample_app, os.path.dirname(__file__))
     environ = sample_environ(PATH_INFO="/blah")
     mw(environ, sample_start_response)
示例#2
0
 def test_execute(self):
     mw = StaticFileMiddleware(sample_app, os.path.dirname(__file__))
     environ = sample_environ(PATH_INFO="/sample.css")
     response = mw(environ, sample_start_response)
     assert response == [b"html, body { background: red; }"]