Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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")