Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/unit/models/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ def test_database_configuration(subtests) -> None:
assert d.sqlite is None
assert d.postgres is not None
assert d.db_type == "postgres"
assert d.config == d1

with subtests.test(msg="SQLite"):
d1 = SQLiteDatabaseConfiguration(
Expand All @@ -903,6 +904,7 @@ def test_database_configuration(subtests) -> None:
assert d.sqlite is not None
assert d.postgres is None
assert d.db_type == "sqlite"
assert d.config == d1


def test_no_databases_configuration() -> None:
Expand All @@ -921,6 +923,10 @@ def test_no_databases_configuration() -> None:
# access propery to call it's getter
_ = d.db_type

with pytest.raises(ValueError, match="No database configuration found"):
# access propery to call it's getter
_ = d.config


def test_two_databases_configuration() -> None:
"""Test if two databases configuration is checked."""
Expand Down