def test_run_app(self): mw = StaticFileMiddleware(sample_app, os.path.dirname(__file__)) environ = sample_environ(PATH_INFO="/blah") mw(environ, sample_start_response)
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; }"]