5 ms·
I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time. I use it with factory_boy (h
by makmanalp 13y ago
I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time.
I use it with factory_boy (http://factoryboy.readthedocs.org/en/latest/ http://factoryboy.readthedocs.org/en/latest/) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc.
I think it helps with experimentation when you're using the REPL and also makes bugs stand out a bit more easily. Very neat for demoing purposes too.
Perhaps my favourite is faker.bs() which always gets a giggle when doing live demos.
- timc3 13y agoI was just about to post why is the package called fake-factory.
- mpron 13y agoIt's probably fake-factory to prevent confusion with the Ruby gem that's been around for more than 6 years http://www.rubyinside.com/faker-quick-fake-data-generation-in-ruby-665.html http://www.rubyinside.com/faker-quick-fake-data-generation-i... It's a standard gem in the community and it's used for generating various types of seed database data. Don't know if does the exact same things that the Python faker does.
- joke2k 13y agoI used fake-factory because faker was already busy on pipy. Initially I asked the author to leave the name, but the response was negative.
- yaph 13y agoNice, fake.bs() looks pretty useful as does fake.catchPhrase()
- Mister_Snuggles 13y agoIf I ever start a company, I'm going to run fake.company() and fake.companySuffix() until I find one that looks good.