mirror of
https://github.com/rendercv/rendercv.git
synced 2025-12-23 21:47:55 -05:00
Fix Unicode corruption in sample YAML name generation (#570)
* fix(sample-generator): remove unnecessary unicode-escape decoding for name * test(sample-generator): add test for creating model with unicode name
This commit is contained in:
committed by
GitHub
parent
7aa105a3b5
commit
1d9deda101
@@ -70,7 +70,6 @@ def create_sample_rendercv_pydantic_model(
|
||||
sample_content_dictionary = read_yaml(sample_content)["cv"]
|
||||
cv = Cv(**sample_content_dictionary)
|
||||
|
||||
name = name.encode().decode("unicode-escape")
|
||||
cv.name = name
|
||||
|
||||
design = built_in_design_adapter.validate_python({"theme": theme})
|
||||
|
||||
@@ -37,6 +37,11 @@ class TestCreateSampleRendercvPydanticModel:
|
||||
name="John Doe", theme="classic", locale="invalid"
|
||||
)
|
||||
|
||||
def test_creates_model_with_unicode_name(self):
|
||||
name = "Matías"
|
||||
data_model = create_sample_rendercv_pydantic_model(name=name)
|
||||
assert data_model.cv.name == name
|
||||
|
||||
|
||||
class TestCreateSampleYamlInputFile:
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user