def test_no_app_static_path(self):
        app = Application()
        app._static_path = None

        result = bst.create_static_handler("/prefix", "/key", app)
        assert len(result) == 3
        assert result[0] == "/prefix/key/static/(.*)"
        assert result[1] == StaticHandler
        assert result[2] == {}

        result = bst.create_static_handler("/prefix", "/", app)
        assert len(result) == 3
        assert result[0] == "/prefix/static/(.*)"
        assert result[1] == StaticHandler
        assert result[2] == {}
    def test_app_static_path(self):
        app = Application()
        app._static_path = "foo"

        result = bst.create_static_handler("/prefix", "/key", app)
        assert len(result) == 3
        assert result[0] == "/prefix/key/static/(.*)"
        assert result[1] == StaticFileHandler
        assert result[2] == {"path": app.static_path}

        result = bst.create_static_handler("/prefix", "/", app)
        assert len(result) == 3
        assert result[0] == "/prefix/static/(.*)"
        assert result[1] == StaticFileHandler
        assert result[2] == {"path": app.static_path}