def _app_restart_policy_test(self, restart_state, restart_config,
                                 expect_restart):
        app_state = APPLICATION_WITHOUT_VOLUME.set(
            restart_policy=restart_state,
        )
        node_state = NodeState(
            uuid=uuid4(), hostname=u"192.0.2.10",
            applications={app_state},
        )
        app_config = app_state.set(
            restart_policy=restart_config,
        )
        node_config = to_node(node_state.set(applications={app_config}))
        if expect_restart:
            expected_changes = restart(app_state, app_config, node_state)
        else:
            expected_changes = no_change()
        assert_application_calculated_changes(
            self, node_state, node_config, set(),
            expected_changes,
        )
Verify that an application with a particular restart policy in its
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/test/test_container.py/ApplicationNodeDeployerCalculateChangesTests._app_restart_policy_test