Closed yakir12 closed 3 years ago
I'm inclined to close this. Here is what I needed to do to define a fake custom user for my specific needs:
fakeuser(id) = User(
DbId(id),
string(Faker.first_name(), " ", Faker.last_name()),
Faker.user_name(),
Faker.password(),
Faker.email())
I can not see how this can be made simpler than it already is.
I'll leave this to your discretion.
Currently there is the profile
method:
internally has a dictionary. However, the method he proposes is more flexible. The function will be added in the next version.
Thank you very much for your contribution.
Thanks for your contribution, this feature has been added to version 0.3 of Faker, here you will find links with more information.
https://app.gitbook.com/@neomatrixcode/s/faker/guide/providers/person
https://app.gitbook.com/@neomatrixcode/s/faker/guide/generator
Wow, looks great!
Users generate custom types that they need to fake.
Exposing a method or two that the user needs to define for her custom type may allow her to fake instances of that type.
Right now it she needs to construct the instance from a combination of the types you already defined.
This is useful when seeding a database for testing/developing.