Hi, Am 17.07.2006 um 06:26 schrieb Russell Keith-Magee:
> On 7/13/06, Simon Willison <[EMAIL PROTECTED]> wrote: > > The best way of running tests against a Django application, to my > > mind, is to run a "fake" web server (i.e. one that doesn't actually > > bind to a port) around the application. > > Agreed; although I'm not sure that you actually need to run a > server in the 'start a process/thread' sense. A TestHandler() that > operates much like the mod_python or wsgi Handler objects (or a > light wrapper around one of those handlers that provides a nice > testing interface) should be sufficient. It's nicer if you don't have an additional process since you can start the debugger in your tests. > The are only two other solutions that come to mind for me: > > 1) The template tag based approach that Michael Radziej > demonstrated in his patch. While this is a good solution from > Michael's perspective (solution that works without having to modify > Django source code), I'm not sure it's the right solution for the > 'official' test tools. To repeat myself, I really don't propose to use this template tag hack if you build it into Django. It's just been a hack to work around the restrictions. I'd say: go and use the event dispatcher, it's much cleaner and looks like the proper solution. Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---