def assert_calculated_changes_for_deployer(case, deployer, node_state, node_config, nonmanifest_datasets, additional_node_states, additional_node_config, expected_changes, local_state, leases=Leases()):
 cluster_state = compute_cluster_state(node_state, additional_node_states, nonmanifest_datasets)
 cluster_configuration = Deployment(nodes=({node_config} | additional_node_config), leases=leases)
 changes = deployer.calculate_changes(cluster_configuration, cluster_state, local_state)
 case.assertEqual(expected_changes, changes)

def assert_calculated_changes_for_deployer ( case , deployer , node_state , node_config , nonmanifest_datasets , additional_node_states , additional_node_config , expected_changes , local_state , leases = Leases ( ) ) : cluster_state = compute_cluster_state ( node_state , additional_node_states , nonmanifest_datasets ) cluster_configuration = Deployment ( nodes = ( { node_config } | additional_node_config ) , leases = leases ) changes = deployer . calculate_changes ( cluster_configuration , cluster_state , local_state ) case . assertEqual ( expected_changes , changes )
assert that calculate_changes returns certain changes when it is invoked with the given state and configuration .