hackersatbrown / api-morning-mail

2 stars 0 forks source link

set up fake data for testing #2

Closed jonahkagan closed 11 years ago

jonahkagan commented 11 years ago

When the server runs in a test environment, it should serve fake morning mail data that we can test against.

sumnerwarren commented 11 years ago

Right now, I've chosen 12-13-2012 as "today" for testing purposes. This can change, but that's what it is for now. I've added an xml file for the all and undergrad feeds for days=1 through days=7 for right now. So there are 14 test files, which should gives us a good amount of data to start with since we're going to support ranges right off the bat. I've also added json versions of these files for testing purposes. Currently the json files map to the xml files exactly, so we can't do any range testing if the range doesn't start with "today." I'll fix that soon. I've also set up a simple framework for handling requests and for getting the test data. I'm about to set up mappings from requests to test data so we can start testing once we get started.

jonahkagan commented 11 years ago

Cool! You might consider writing a function to get the date for "today" that returns the date when the env is production and 12-13-2012 when the env is test.

Jonah

On Thu, Dec 13, 2012 at 10:22 PM, jswarren notifications@github.com wrote:

Right now, I've chosen 12-13-2012 as "today" for testing purposes. This can change, but that's what it is for now. I've added an xml file for each the all and undergrad feeds for days=1 through days=7 for right now. So there are 14 test files, which should gives us a good amount of data to start with since we're going to support ranges right off the bat. I've also added json versions of these files for testing purposes. Right now the json files map to the xml files exactly, so we can't do any range testing if the range doesn't start with "today." I'll fix that next. I've also set up simple framework for handling requests and for getting the test data. I'm about to set up mappings from requests to test data so we can start testing once we get started.

— Reply to this email directly or view it on GitHubhttps://github.com/hackersatbrown/api-morning-mail/issues/2#issuecomment-11363888.