Skip to content

Commit

Permalink
tests: no OIDC test outside the OIDC zone
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Mar 29, 2024
1 parent b36c654 commit dd7768e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/app/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,20 @@ def test_configuration_nestedsecrets_directory(tmp_path, backend, configuration)
def test_configuration_from_environment_vars():
os.environ["SECRET_KEY"] = "very-very-secret"
os.environ["CANAILLE__SMTP__FROM_ADDR"] = "[email protected]"
os.environ["CANAILLE_OIDC__REQUIRE_NONCE"] = "false"
os.environ["CANAILLE_SQL__DATABASE_URI"] = "sqlite:///anything.db"

conf = settings_factory({"TIMEZONE": "UTC"})
assert conf.SECRET_KEY == "very-very-secret"
assert conf.CANAILLE.SMTP.FROM_ADDR == "[email protected]"
assert conf.CANAILLE_OIDC.REQUIRE_NONCE is False
assert conf.CANAILLE_SQL.DATABASE_URI == "sqlite:///anything.db"

app = create_app({"TIMEZONE": "UTC"})
assert app.config["SECRET_KEY"] == "very-very-secret"
assert app.config["CANAILLE"]["SMTP"]["FROM_ADDR"] == "[email protected]"
assert app.config["CANAILLE_OIDC"]["REQUIRE_NONCE"] is False
assert app.config["CANAILLE_SQL"]["DATABASE_URI"] == "sqlite:///anything.db"

del os.environ["SECRET_KEY"]
del os.environ["CANAILLE__SMTP__FROM_ADDR"]
del os.environ["CANAILLE_OIDC__REQUIRE_NONCE"]
del os.environ["CANAILLE_SQL__DATABASE_URI"]


Expand Down

0 comments on commit dd7768e

Please sign in to comment.