fixes disk usage tests

This commit is contained in:
msramalho
2026-03-02 19:00:36 +00:00
parent f0bb6c265d
commit 62a3bc72f6
2 changed files with 17 additions and 8 deletions

View File

@@ -44,11 +44,11 @@ def test_alembic(db_session):
side_effect=Exception("mocked error"),
)
def test_logging_middleware(m1, client_with_auth):
assert len(EXCEPTION_COUNTER.collect()[0].samples) == 0
samples_before = len(EXCEPTION_COUNTER.collect()[0].samples)
with pytest.raises(Exception, match="mocked error"):
client_with_auth.delete("/url/123")
# creates one empty and one from above
assert len(EXCEPTION_COUNTER.collect()[0].samples) == 2
# the exception should have created new counter samples
assert len(EXCEPTION_COUNTER.collect()[0].samples) == samples_before + 2
def test_serve_local_archive_logic(get_settings):