@@ -1028,6 +1028,8 @@ def test_get_context_without_ti_context_from_server(self, mocked_parse, make_ti_
1028
1028
_ti_context_from_server = None ,
1029
1029
start_date = start_date ,
1030
1030
)
1031
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1032
+
1031
1033
context = runtime_ti .get_template_context ()
1032
1034
1033
1035
# Verify the context keys and values
@@ -1061,6 +1063,7 @@ def test_get_context_with_ti_context_from_server(self, create_runtime_ti, mock_s
1061
1063
# `task_sdk/tests/api/test_client.py::test_task_instance_start` checks the context is received
1062
1064
# from the API server
1063
1065
runtime_ti = create_runtime_ti (task = task , dag_id = "basic_task" )
1066
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1064
1067
1065
1068
dr = runtime_ti ._ti_context_from_server .dag_run
1066
1069
@@ -1113,6 +1116,7 @@ def test_lazy_loading_not_triggered_until_accessed(self, create_runtime_ti, mock
1113
1116
"""Ensure lazy-loaded attributes are not resolved until accessed."""
1114
1117
task = BaseOperator (task_id = "hello" )
1115
1118
runtime_ti = create_runtime_ti (task = task , dag_id = "basic_task" )
1119
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1116
1120
1117
1121
mock_supervisor_comms .get_message .return_value = PrevSuccessfulDagRunResult (
1118
1122
data_interval_end = timezone .datetime (2025 , 1 , 1 , 2 , 0 , 0 ),
@@ -1149,6 +1153,7 @@ def test_get_connection_from_context(self, create_runtime_ti, mock_supervisor_co
1149
1153
)
1150
1154
1151
1155
runtime_ti = create_runtime_ti (task = task , dag_id = "test_get_connection_from_context" )
1156
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1152
1157
mock_supervisor_comms .get_message .return_value = conn
1153
1158
1154
1159
context = runtime_ti .get_template_context ()
@@ -1185,6 +1190,7 @@ def test_template_render(self, create_runtime_ti):
1185
1190
task = BaseOperator (task_id = "test_template_render_task" )
1186
1191
1187
1192
runtime_ti = create_runtime_ti (task = task , dag_id = "test_template_render" )
1193
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1188
1194
template_context = runtime_ti .get_template_context ()
1189
1195
result = runtime_ti .task .render_template (
1190
1196
"Task: {{ dag.dag_id }} -> {{ task.task_id }}" , template_context
@@ -1212,6 +1218,7 @@ def test_template_with_connection(
1212
1218
"""
1213
1219
task = BaseOperator (task_id = "hello" )
1214
1220
runtime_ti = create_runtime_ti (task = task , dag_id = "test_template_with_connection" )
1221
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1215
1222
1216
1223
conn = ConnectionResult (
1217
1224
conn_id = "a_connection" ,
@@ -1247,6 +1254,7 @@ def test_get_variable_from_context(
1247
1254
1248
1255
task = BaseOperator (task_id = "hello" )
1249
1256
runtime_ti = create_runtime_ti (task = task )
1257
+ runtime_ti .log_url = runtime_ti .get_log_url_from_ti ()
1250
1258
1251
1259
var = VariableResult (key = "test_key" , value = var_value )
1252
1260
0 commit comments