/snap/lxd/40526/lib/python3/dist-packages/ceph/tests
NameSizeModeActions
factories.py36260644editdlrm
test_datetime.py17440644editdlrm
test_disk_selector.py191140644editdlrm
test_drive_group.py101160644editdlrm
test_inventory.py7030644editdlrm
test_service_spec.py104900644editdlrm
test_utils.py13290644editdlrm
utils.py13590644editdlrm
__init__.py00644editdlrm
Edit: /snap/lxd/40526/lib/python3/dist-packages/ceph/tests/test_inventory.py (703B)
import json import os import pytest from ceph.deployment.inventory import Devices @pytest.mark.parametrize("filename", [ os.path.dirname(__file__) + '/c-v-inventory.json', os.path.dirname(__file__) + '/../../../pybind/mgr/test_orchestrator/du' 'mmy_data.json', ]) def test_from_json(filename): with open(filename) as f: data = json.load(f) if 'inventory' in data: data = data['inventory'] ds = Devices.from_json(data) assert len(ds.devices) == len(data) assert Devices.from_json(ds.to_json()) == ds