mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-05 23:20:19 +00:00
1 line
2.2 KiB
JSON
1 line
2.2 KiB
JSON
[{"user_id": 18845, "stars": [], "topic_id": 34793, "date_created": 1305136176.69434, "message": "Hey Y'all. I have built a REST API with Tastypie. It seems like it should be pretty easy to setup some unit tests to make sure I don't break it. I just wanted see if anyone had any tips. Thanks", "group_id": 81, "id": 1011103}, {"user_id": 18091, "stars": [], "topic_id": 34793, "date_created": 1305137559.1850679, "message": "I ended up with a python script that has the tests in it which takes a parameter that determines if the tests go against my local development box or the deployed app on my hosting provider. Then I have a shell script to run the regression tests locally and a second one to run them against the remote server. I plan to move this over to nose at some point, but it works well for me now. One gotcha is that some versions (all?) urllib2 throw an exception if the result code is not 200 (this caused a problem as I return 201 on created, or when testing various 40x errors).", "group_id": 81, "id": 1011453}, {"user_id": 1806, "stars": [], "topic_id": 34793, "date_created": 1305234568.0207989, "message": "eg self.assertEquals(httplib.OK, response.status_code)", "group_id": 81, "id": 1030035}, {"user_id": 1806, "stars": [], "topic_id": 34793, "date_created": 1305234496.1240189, "message": "Nano-tip: use httplib to provide nice named constants for response codes", "group_id": 81, "id": 1030015}, {"user_id": 960, "stars": [], "topic_id": 34793, "date_created": 1305236310.31182, "message": "I've never had a use case for it, but I've often looked at https://github.com/garethr/urltest", "group_id": 81, "id": 1030293}, {"user_id": 7376, "stars": [], "topic_id": 34793, "date_created": 1305320774.2352879, "message": "You could always use Django's test client which eliminates the need to use HTTP.", "group_id": 81, "id": 1047352}, {"user_id": 7376, "stars": [], "topic_id": 34793, "date_created": 1305320817.677304, "message": "http://docs.djangoproject.com/en/1.3/topics/testing/#module-django.test.client", "group_id": 81, "id": 1047365}, {"user_id": 18845, "stars": [], "topic_id": 34793, "date_created": 1306171429.1550391, "message": "Thanks @ericmortiz I didn't know about the Django test client.", "group_id": 81, "id": 1154790}] |