diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index 88487c381..84e98d890 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -254,7 +254,7 @@ class Toaster(Component): if message == "" and ("title" not in props or "description" not in props): raise ValueError("Toast message or title or description must be provided.") if props: - args = LiteralVar.create(ToastProps(component_name="rx.toast", **props)) + args = LiteralVar.create(ToastProps(component_name="rx.toast", **props)) # type: ignore toast = f"{toast_command}(`{message}`, {str(args)})" else: toast = f"{toast_command}(`{message}`)" diff --git a/tests/units/components/test_props.py b/tests/units/components/test_props.py index aa5bd5db5..35880e352 100644 --- a/tests/units/components/test_props.py +++ b/tests/units/components/test_props.py @@ -52,7 +52,7 @@ class PropB(NoExtrasAllowedProps): ) def test_no_extras_allowed_props(props_class, kwargs, should_raise): if should_raise: - with pytest.raises((InvalidPropValueError, ValidationError)): + with pytest.raises((ValidationError, InvalidPropValueError)): props_class(**kwargs) else: props_instance = props_class(**kwargs)