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