Search code examples
factory-boy

Excluding prefixes and suffixes from Faker("name")


I've noticed that Faker("name") sometimes return prefixes (e.g., Mr.) and suffixes (e.g., MD). Is there a good way to exclude prefixes and suffixes from the names generated?

Thanks


Solution

  • You could very well just concatenate faker.first_name() and faker.last_name().