fcurella / django-fakery

🏭 An easy-to-use implementation of Creation Methods for Django, backed by Faker.
http://django-fakery.readthedocs.org/en/stable/
MIT License
115 stars 6 forks source link

Faker does not have `full_name` provider #77

Open sobolevn opened 1 week ago

sobolevn commented 1 week ago

I faced this problem:

.venv/lib/python3.11/site-packages/django_fakery/faker_factory.py:647: in fn
    return make(fields=kwargs)
.venv/lib/python3.11/site-packages/django_fakery/faker_factory.py:585: in make
    return self.make_one(model, fields, pre_save, post_save, seed)
.venv/lib/python3.11/site-packages/django_fakery/faker_factory.py:327: in make_one
    instance, m2ms = self.build_one(
.venv/lib/python3.11/site-packages/django_fakery/faker_factory.py:191: in build_one
    value = evaluator.fake_value(model, model_field)
.venv/lib/python3.11/site-packages/django_fakery/values.py:59: in fake_value
    return self.evaluate_fake(self.mappings_names[field.name], field)
.venv/lib/python3.11/site-packages/django_fakery/values.py:48: in evaluate_fake
    func = getattr(self.faker, resolver[0])
E   AttributeError: 'Generator' object has no attribute 'full_name'

Bacause, it is called name, not full_name. See https://faker.readthedocs.io/en/stable/providers/faker.providers.person.html#faker.providers.person.Provider.name

Fixes #...

What does this changes

Brief summary of the changes

What was wrong

Description of what was the root cause of the issue.

How this fixes it

Description of how the changes fix the issue.

coveralls commented 1 week ago

Coverage Status

coverage: 90.855%. remained the same when pulling 73a522beae1158fd0c15c75a18624fb975450eaa on sobolevn:patch-5 into d692382a98d5aa342c6527cc9da986b84b5c88b6 on fcurella:master.