Example #1
0
    def test_no_override(self):
        """Ensure that the webassets defaults do not override existing
        Flask config values.
        """
        app = Flask(__name__)
        app.config["ASSETS_UPDATER"] = "MOO"
        env = Environment(app)
        assert env.updater == "MOO"
        assert app.config["ASSETS_UPDATER"] == "MOO"

        # Neither do the defaults that flask-assets set.
        app = Flask(__name__)
        app.config["ASSETS_URL"] = "MOO"
        env = Environment(app)
        assert env.url == "MOO"
        assert app.config["ASSETS_URL"] == "MOO"