vikramcse commented on issue #15748:
URL: https://github.com/apache/airflow/issues/15748#issuecomment-841846517
@uranusjr Thanks for checking the issue.
I am writing the unit tests for the `--ship-dag` run tasks flag, which
returns a pickle_id like
```
Pickled dag <DAG: example_python_operator> as pickle_id: 2
```
and the test
```python
def test_cli_run_with_ship_dag_and_interactive_flag(self):
"""
tasks run should return valid pickle_id
"""
with redirect_stdout(io.StringIO()) as stdout:
task_command.task_run(
self.parser.parse_args(
[
'tasks',
'run',
'example_python_operator',
'print_the_context',
DEFAULT_DATE.isoformat(),
'--ship-dag',
'--interactive',
]
)
)
output = stdout.getvalue()
print(output)
```
In this case the pickle_id is a dynamic field. It will be helpful if you
give me some example for testing the dynamically generating pickle_id
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]