refactor: drop resources fallback; fixtures are device0-only
This commit is contained in:
1 parent
fd2aa9e64d
commit
9e5a169c82
1 file changed
+1
-7
+1
-7
@@ -8,13 +8,7 @@ FIXTURES = Path(__file__).resolve().parent / 'fixtures'
|
|||||||
|
|
||||||
def _resources_from_dump(dump: dict) -> dict[str, dict]:
|
def _resources_from_dump(dump: dict) -> dict[str, dict]:
|
||||||
from samsung_appliance.bridge import _parse_device0_batch
|
from samsung_appliance.bridge import _parse_device0_batch
|
||||||
d0 = dump.get('device0')
|
return _parse_device0_batch(dump['device0'])
|
||||||
if isinstance(d0, list) and len(d0) > 1:
|
|
||||||
batch = _parse_device0_batch(d0)
|
|
||||||
if batch:
|
|
||||||
return batch
|
|
||||||
return {k: v for k, v in dump.get('resources', {}).items()
|
|
||||||
if isinstance(v, dict)}
|
|
||||||
|
|
||||||
|
|
||||||
def _load_device(name: str) -> dict[str, dict]:
|
def _load_device(name: str) -> dict[str, dict]:
|
||||||
|
|||||||
Reference in new issue
Block a user