mirror of
https://github.com/Mesteriis/hassio-addons-avm.git
synced 2026-01-10 15:31:02 +01:00
14 lines
460 B
Python
14 lines
460 B
Python
import pytest
|
|
from backup.util import Estimator
|
|
from backup.config import Config, Setting
|
|
from backup.exceptions import LowSpaceError
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_check_space(estimator: Estimator, coord, config: Config):
|
|
estimator.refresh()
|
|
estimator.checkSpace(coord.backups())
|
|
|
|
config.override(Setting.LOW_SPACE_THRESHOLD, estimator.getBytesFree() + 1)
|
|
with pytest.raises(LowSpaceError):
|
|
estimator.checkSpace(coord.backups())
|