def assert_discovered_state(case, deployer, expected_discovered_datasets, persistent_state=PersistentState()):
 previous_state = NodeState(uuid=deployer.node_uuid, hostname=deployer.hostname, applications=None, manifestations=None, paths=None, devices=None)
 discovering = deployer.discover_state(DeploymentState(nodes={previous_state}), persistent_state=persistent_state)
 local_state = case.successResultOf(discovering)
 case.assertEqual(local_state, BlockDeviceDeployerLocalState(hostname=deployer.hostname, node_uuid=deployer.node_uuid, datasets=dataset_map_from_iterable(expected_discovered_datasets)))

def assert_discovered_state ( case , deployer , expected_discovered_datasets , persistent_state = PersistentState ( ) ) : previous_state = NodeState ( uuid = deployer . node_uuid , hostname = deployer . hostname , applications = None , manifestations = None , paths = None , devices = None ) discovering = deployer . discover_state ( DeploymentState ( nodes = { previous_state } ) , persistent_state = persistent_state ) local_state = case . successResultOf ( discovering ) case . assertEqual ( local_state , BlockDeviceDeployerLocalState ( hostname = deployer . hostname , node_uuid = deployer . node_uuid , datasets = dataset_map_from_iterable ( expected_discovered_datasets ) ) )
assert that datasets on the state object returned by deployer .