diff --git a/backend/src/tests/core/domain/value_objects/test_text.py b/backend/src/tests/core/domain/value_objects/test_text.py index 185b21b16..43a79ef08 100644 --- a/backend/src/tests/core/domain/value_objects/test_text.py +++ b/backend/src/tests/core/domain/value_objects/test_text.py @@ -6,16 +6,16 @@ from kwai.core.domain.value_objects.identifier import IntIdentifier from kwai.core.domain.value_objects.name import Name from kwai.core.domain.value_objects.owner import Owner -from kwai.core.domain.value_objects.text import LocaleText, Text +from kwai.core.domain.value_objects.text import DocumentFormat, Locale, LocaleText, Text from kwai.core.domain.value_objects.unique_id import UniqueId @pytest.fixture() -def content(locale: str): +def content(locale: Locale): """Create a fixture for Content.""" return LocaleText( locale=locale, - format="MD", + format=DocumentFormat.MARKDOWN, title="Test", content="Test", summary="Test", @@ -27,7 +27,7 @@ def content(locale: str): ) -@pytest.mark.parametrize("locale", ["nl"]) +@pytest.mark.parametrize("locale", [Locale.NL]) def test_add_translation(locale, request): """Test the add_translation method.""" content = request.getfixturevalue("content") @@ -37,7 +37,7 @@ def test_add_translation(locale, request): ), f"There should be a translation available for {locale}" -@pytest.mark.parametrize("locale", ["nl"]) +@pytest.mark.parametrize("locale", [Locale.NL]) def test_remove_translation(locale, request): """Test the remove_translation method.""" content = request.getfixturevalue("content") @@ -47,7 +47,7 @@ def test_remove_translation(locale, request): ), f"There should be no translation available for {locale}" -@pytest.mark.parametrize("locale", ["nl"]) +@pytest.mark.parametrize("locale", [Locale.NL]) def test_replace_translation(locale, request): """Test the replace_translation method.""" content = request.getfixturevalue("content")