Skip to content

Commit fef3abe

Browse files
fix test_get_cloud_function_name
1 parent ef14cad commit fef3abe

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/unit/functions/test_remote_function_utils.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,48 @@ def test_get_remote_function_locations(
4242

4343

4444
@pytest.mark.parametrize(
45-
"func_hash, session_id, uniq_suffix, expected_name",
45+
"func_hash, user_given_name, session_id, uniq_suffix, expected_name",
4646
[
4747
(
4848
"hash123",
49+
"my_func",
4950
None,
5051
None,
51-
"bigframes-hash123",
52+
"bigframes-my_func-hash123",
5253
),
5354
(
5455
"hash456",
56+
None,
5557
"session789",
5658
None,
5759
"bigframes-session789-hash456",
5860
),
5961
(
6062
"hash123",
6163
None,
64+
None,
6265
"suffixABC",
6366
"bigframes-hash123-suffixABC",
6467
),
6568
(
6669
"hash456",
70+
"really_cool_udf",
6771
"session789",
6872
"suffixDEF",
69-
"bigframes-session789-hash456-suffixDEF",
73+
"bigframes-really_cool_udf-session789-hash456-suffixDEF",
7074
),
7175
],
7276
)
73-
def test_get_cloud_function_name(func_hash, session_id, uniq_suffix, expected_name):
77+
def test_get_cloud_function_name(
78+
func_hash, user_given_name, session_id, uniq_suffix, expected_name
79+
):
7480
"""Tests the construction of the cloud function name from its parts."""
75-
result = _utils.get_cloud_function_name(func_hash, session_id, uniq_suffix)
81+
result = _utils.get_cloud_function_name(
82+
func_hash,
83+
user_given_name=user_given_name,
84+
session_id=session_id,
85+
uniq_suffix=uniq_suffix,
86+
)
7687

7788
assert result == expected_name
7889

0 commit comments

Comments
 (0)