Skip to content

Commit c60e889

Browse files
committed
test: Improve test for checking if invoker with no elements throws
1 parent b666dbd commit c60e889

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_options.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from firebase_functions import options, https_fn
1818
from firebase_functions import params
1919
from firebase_functions.private.serving import functions_as_yaml, merge_required_apis
20+
from pytest import raises
2021
# pylint: disable=protected-access
2122

2223

@@ -224,7 +225,5 @@ def test_invoker_with_one_element_doesnt_throw():
224225

225226

226227
def test_invoker_with_no_element_throws():
227-
try:
228+
with raises(AssertionError, match="HttpsOptions: Invalid option for invoker - must be a non-empty list."):
228229
options.HttpsOptions(invoker=[])._endpoint(func_name="test")
229-
except AssertionError:
230-
return

0 commit comments

Comments
 (0)