mhacks-web icon indicating copy to clipboard operation
mhacks-web copied to clipboard

Ability to mock database results during development

Open konnork opened this issue 8 years ago • 2 comments

Use Case

During development, be able to generate instances of model objects for testing without having to manually create fake objects in the database

Example: I just cloned the repo and have begun working on the application reader, but I don't want to create 10 fake user accounts to test with

konnork avatar Apr 14 '17 06:04 konnork

@antoniomika @roball24 Thoughts on this one?

konnork avatar Apr 14 '17 06:04 konnork

Let's just create a databuilder cli script. It'll handle the creation of users/other types of models and inputting them into the database for testing everything, but will have the ability to roll back the transaction when testing is complete. We could use something like https://www.npmjs.com/package/random-user for the generation of the fake user info.

antoniomika avatar May 26 '17 02:05 antoniomika