Skip to content

Commit 00c23ca

Browse files
committed
catch warnings
1 parent 3535fea commit 00c23ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ async def test_pg_settings_with_env_postgres(monkeypatch):
2424
monkeypatch.setenv("POSTGRES_HOST", "0.0.0.0")
2525
monkeypatch.setenv("POSTGRES_PORT", "1111")
2626
monkeypatch.setenv("POSTGRES_DBNAME", "pgstac")
27-
assert PostgresSettings(_env_file=None)
27+
with pytest.warns(DeprecationWarning) as record:
28+
assert PostgresSettings(_env_file=None)
29+
assert len(record) == 5
2830

2931

3032
async def test_pg_settings_attributes(monkeypatch):

0 commit comments

Comments
 (0)