Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faker does not have full_name provider #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sobolevn
Copy link
Contributor

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.

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
@coveralls
Copy link

Coverage Status

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants