diff --git a/tests/units/components/test_props.py b/tests/units/components/test_props.py index 35880e352..8ab07f135 100644 --- a/tests/units/components/test_props.py +++ b/tests/units/components/test_props.py @@ -1,9 +1,13 @@ import pytest -from pydantic import ValidationError from reflex.components.props import NoExtrasAllowedProps from reflex.utils.exceptions import InvalidPropValueError +try: + from pydantic.v1 import ValidationError +except ModuleNotFoundError: + from pydantic import ValidationError + class PropA(NoExtrasAllowedProps): """Base prop class."""