mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
4.1 KiB
JSON
1 line
4.1 KiB
JSON
[{"user_id": 11405, "stars": [], "topic_id": 10524, "date_created": 1299168020.3755269, "message": "The first test that comes to my mind would be: \"Alright, I have a news app. When browsing to \"/\" (read: the root as seem from this app's urls.py), I should see a list of news", "group_id": 81, "id": 260914}, {"user_id": 11405, "stars": [], "topic_id": 10524, "date_created": 1299167913.004271, "message": "I can't really think how to create tests since there will be no Django installation to test things like URL paths", "group_id": 81, "id": 260908}, {"user_id": 11405, "stars": [], "topic_id": 10524, "date_created": 1299168091.4930789, "message": "Maybe someone can point me into a good direction on how to test isolated reusable django apps...", "group_id": 81, "id": 260922}, {"user_id": 11405, "stars": [{"date_created": 1299185173.353745, "user_id": 1243}], "topic_id": 10524, "date_created": 1299167826.0758469, "message": "Hey guys I want to create a reusable news app (I know there are dozens, I want to build my own anyways). I was wondering if it is possible to do this with a TDD approach.", "group_id": 81, "id": 260894}, {"user_id": 11405, "stars": [], "topic_id": 10524, "date_created": 1299167863.242661, "message": "The thing is... the app should be installable via pip or easy_install and thus will be its own isolated repository (obviously)...", "group_id": 81, "id": 260902}, {"user_id": 5495, "stars": [], "topic_id": 10524, "date_created": 1299169739.1002741, "message": "not sure if this will spits out a reusable django app but might come close http://lettuce.it/recipes/django-lxml.html#recipes-django-lxml", "group_id": 81, "id": 261062}, {"user_id": 15180, "stars": [], "topic_id": 10524, "date_created": 1299172243.1771719, "message": "I would use zc.buildout, keeps your app isolated and you don't need a project to test it", "group_id": 81, "id": 261423}, {"user_id": 1822, "stars": [{"date_created": 1299173109.7960091, "user_id": 15180}, {"date_created": 1299173904.7381771, "user_id": 1736}, {"date_created": 1299200694.0589881, "user_id": 11405}, {"date_created": 1300132171.5761731, "user_id": 21166}], "topic_id": 10524, "date_created": 1299172650.89902, "message": "a sample_project, or test_project at the top level of your dist is always nice - serves as a good host for tests as well as practical documentation on how to integrate your app into a project with urls, templates, settings, etc.", "group_id": 81, "id": 261502}, {"user_id": 3580, "stars": [], "topic_id": 10524, "date_created": 1299171673.7406869, "message": "So.. off the top of my head, I think I'd probably build an app specifically for testing that sits next to your re-usable one and has URLs, etc.. (either that or come up with a clever strategy for wiring up that app at runtime).. Then django.test.Client and django.core.urlresolvers.reverse are your friends :)", "group_id": 81, "id": 261344}, {"user_id": 15180, "stars": [], "topic_id": 10524, "date_created": 1299172245.9085331, "message": "more here http://jacobian.org/writing/django-apps-with-buildout/", "group_id": 81, "id": 261425}, {"user_id": 214, "stars": [{"date_created": 1299227695.756187, "user_id": 11405}], "topic_id": 10524, "date_created": 1299174524.3705881, "message": "All you really need is a test_urls.py and a test_settings.py with ROOT_URLCONF. All the other recommendations above (full test \"project\", buildout etc) might be useful in some circumstances, but are more than you need for doing a reusable app with tests.", "group_id": 81, "id": 261816}, {"user_id": 214, "stars": [{"date_created": 1299227696.1395891, "user_id": 11405}], "topic_id": 10524, "date_created": 1299174550.432199, "message": "You don't even need test_settings.py, you can provide a runtests.py script that uses settings.configure to set your basic test configuration.", "group_id": 81, "id": 261820}, {"user_id": 214, "stars": [{"date_created": 1299203454.8998859, "user_id": 11405}], "topic_id": 10524, "date_created": 1299174712.6150949, "message": "See e.g. https://github.com/alex/django-taggit for a sample of this approach. Also demonstrates adding your tests/ package to INSTALLED_APPS during tests to have test-only models.", "group_id": 81, "id": 261835}] |