def test013():
    test_file = "test013.txt"
    test_file_path = find_file(test_file)
    
    class SimpleInfra(InfraModel):
        testbox = StaticServer("testbox", find_ip())
    infra = SimpleInfra("simple")
    
    class SimpleNamespace(NamespaceModel):
        with_variables(Var("DEST", "/tmp/!{FILE}"),
                       Var("FILE", test_file),
                       Var("var1", "summat"),
                       Var("var2", "or"),
                       Var("var3", "the"),
                       Var("var4", "other"))
        target = Role("target", host_ref=SimpleInfra.testbox)
    ns = SimpleNamespace()
        
    class SimpleConfig(ConfigModel):
        reset = CommandTask("reset", "/bin/rm -rf !{DEST}", removes="!{DEST}",
                            task_role=SimpleNamespace.target)
        process = ProcessCopyFileTask("pcf", "!{DEST}",
                                      src=test_file_path,
                                      task_role=SimpleNamespace.target,
                                      repeat_count=1)
        with_dependencies(reset | process)
    cfg = SimpleConfig()
    
    ea = AnsibleExecutionAgent(config_model_instance=cfg,
                               namespace_model_instance=ns,
                               no_delay=True)
    try:
        ea.perform_config()
        file_content = [l.strip()
                        for l in file("/tmp/test013.txt", "r").readlines()]
        assert "summat or" == file_content[0] and "the other" == file_content[1]
    except ExecutionException, e:
        import traceback
        for task, etype, value, tb in ea.get_aborted_tasks():
            print ">>>Task {} failed with the following:".format(task.name)
            traceback.print_exception(etype, value, tb, file=sys.stdout)
            print
        assert False, e.message
test013: Similar to test011, but with multi-line files.
dataset/ETHPy150Open haxsaw/actuator/src/tests/ansible_tests.py/test013