import random
            return [random.random() for _ in range(100)]
        f()
    dr = dag_maker.create_dagrun()
    (ti,) = dr.task_instances
    dag.get_task("f").execute(context=ti.get_template_context(session=session))
    mock_hook.assert_called_once_with(
        conn_id=None,
        in_cluster=False,
        cluster_context="default",
        config_file="/tmp/fake_file",
    )
    assert mock_create_pod.call_count == 1
    containers = mock_create_pod.call_args[1]["pod"].spec.containers
    assert len(containers) == 1
    assert containers[0].command[0] == "bash"
    assert len(containers[0].args) == 0
    assert containers[0].env[0].name == "__PYTHON_SCRIPT"
    assert containers[0].env[0].value
    assert containers[0].env[1].name == "__PYTHON_INPUT"
    
    decoded_input = pickle.loads(base64.b64decode(containers[0].env[1].value))
    assert decoded_input == {"args": [], "kwargs": {}}
def test_kubernetes_with_input_output(