blob: 9fe9ca438984af79867764b398abf9c25952b782 [file]
# coding: utf-8
"""
Airflow API
Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter.
The version of the OpenAPI document: 2
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from airflow_client.client.models.task_instance_history_collection_response import TaskInstanceHistoryCollectionResponse
class TestTaskInstanceHistoryCollectionResponse(unittest.TestCase):
"""TaskInstanceHistoryCollectionResponse unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> TaskInstanceHistoryCollectionResponse:
"""Test TaskInstanceHistoryCollectionResponse
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `TaskInstanceHistoryCollectionResponse`
"""
model = TaskInstanceHistoryCollectionResponse()
if include_optional:
return TaskInstanceHistoryCollectionResponse(
task_instances = [
airflow_client.client.models.task_instance_history_response.TaskInstanceHistoryResponse(
dag_display_name = '',
dag_id = '',
dag_run_id = '',
dag_version = null,
duration = 1.337,
end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
executor = '',
executor_config = '',
hostname = '',
map_index = 56,
max_tries = 56,
operator = '',
operator_name = '',
pid = 56,
pool = '',
pool_slots = 56,
priority_weight = 56,
queue = '',
queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
state = null,
task_display_name = '',
task_id = '',
try_number = 56,
unixname = '', )
],
total_entries = 56
)
else:
return TaskInstanceHistoryCollectionResponse(
task_instances = [
airflow_client.client.models.task_instance_history_response.TaskInstanceHistoryResponse(
dag_display_name = '',
dag_id = '',
dag_run_id = '',
dag_version = null,
duration = 1.337,
end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
executor = '',
executor_config = '',
hostname = '',
map_index = 56,
max_tries = 56,
operator = '',
operator_name = '',
pid = 56,
pool = '',
pool_slots = 56,
priority_weight = 56,
queue = '',
queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
state = null,
task_display_name = '',
task_id = '',
try_number = 56,
unixname = '', )
],
total_entries = 56,
)
"""
def testTaskInstanceHistoryCollectionResponse(self):
"""Test TaskInstanceHistoryCollectionResponse"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()