def test_safe_proxy_nested_lambda(app_context: AppContext) -> None: def func(input_: Any) -> Any: return input_ with pytest.raises(SupersetTemplateException): safe_proxy(func, {"foo": lambda: "bar"})
def test_safe_proxy_primitive(app_context: AppContext) -> None: def func(input_: Any) -> Any: return input_ assert safe_proxy(func, "foo") == "foo"
def test_safe_proxy_dict(app_context: AppContext) -> None: def func(input_: Any) -> Any: return input_ assert safe_proxy(func, {"foo": "bar"}) == {"foo": "bar"}
def test_safe_proxy_nested_lambda(self) -> None: def func(input: Any) -> Any: return input with pytest.raises(SupersetTemplateException): safe_proxy(func, {"foo": lambda: "bar"})
def test_safe_proxy_dict(self) -> None: def func(input: Any) -> Any: return input return_value = safe_proxy(func, {"foo": "bar"}) self.assertEqual({"foo": "bar"}, return_value)
def test_safe_proxy_primitive(self) -> None: def func(input: Any) -> Any: return input return_value = safe_proxy(func, "foo") self.assertEqual("foo", return_value)
def test_safe_proxy_lambda() -> None: def func(input_: Any) -> Any: return input_ with pytest.raises(SupersetTemplateException): safe_proxy(func, lambda: "bar")
def test_safe_proxy_primitive() -> None: def func(input_: Any) -> Any: return input_ assert safe_proxy(func, "foo") == "foo"