How to use the environs.EnvSealedError function in environs

To help you get started, we’ve selected a few environs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sloria / environs / tests / test_environs.py View on Github external
def test_custom_parser_not_called_after_seal(self, env, set_env):
        set_env({"URL": "test.test/"})

        @env.parser_for("https_url")
        def https_url(value):
            return "https://" + value

        env.seal()
        with pytest.raises(environs.EnvSealedError, match="Env has already been sealed"):
            env.https_url("URL")