supervisor/tests/host/test_info.py
dependabot[bot] d4fd8f3f0d
Bump black from 21.12b0 to 22.1.0 (#3425)
* Bump black from 21.12b0 to 22.1.0

Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits/22.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update black

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2022-02-10 14:13:40 +01:00

14 lines
331 B
Python

"""Test host info."""
from unittest.mock import patch
from supervisor.host.info import InfoCenter
def test_host_free_space(coresys):
"""Test host free space."""
info = InfoCenter(coresys)
with patch("shutil.disk_usage", return_value=(42, 42, 2 * (1024.0**3))):
free = info.free_space
assert free == 2.0