File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
airbyte_cdk/sources/declarative/interpolation
unit_tests/sources/declarative/interpolation Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -183,12 +183,12 @@ def format_datetime(
183183 return DatetimeParser ().format (dt = dt_datetime , format = format )
184184
185185
186- def sanitize (value : str ) -> str :
186+ def sanitize_url (value : str ) -> str :
187187 """
188188 Sanitizes a value by via urllib.parse.quote_plus
189189
190190 Usage:
191- `"{{ sanitize ('https://example.com/path?query=value') }}"`
191+ `"{{ sanitize_url ('https://example.com/path?query=value') }}"`
192192 """
193193 sanitization_strategy = quote_plus
194194 return sanitization_strategy (value )
@@ -205,6 +205,6 @@ def sanitize(value: str) -> str:
205205 format_datetime ,
206206 today_with_timezone ,
207207 str_to_datetime ,
208- sanitize ,
208+ sanitize_url ,
209209]
210210macros = {f .__name__ : f for f in _macros_list }
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ def test_given_invalid_date_str_to_datetime_raises_value_error():
245245 ("test_non_url_string" , "hello world" , "hello+world" ),
246246 ],
247247)
248- def test_sanitize (test_name , input_value , expected_output ):
249- sanitize = macros ["sanitize " ]
250- actual_output = sanitize (input_value )
248+ def test_sanitize_url (test_name , input_value , expected_output ):
249+ sanitize_url = macros ["sanitize_url " ]
250+ actual_output = sanitize_url (input_value )
251251 assert actual_output == expected_output
You can’t perform that action at this time.
0 commit comments