Re: Testing dynamic apps

2008-11-27 Thread Julien Phalip
On Nov 28, 1:21 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 11:21 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > I'm keen to try to find some proper ways to fix this, but before I go > > too deep into the bowels of Django's testing framework, I was > >

Re: Testing dynamic apps

2008-11-27 Thread Russell Keith-Magee
On Thu, Nov 27, 2008 at 11:21 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > I'm keen to try to find some proper ways to fix this, but before I go > too deep into the bowels of Django's testing framework, I was > wondering what would be the criticisms you'd have about the "solution" > I came up

Re: Testing dynamic apps

2008-11-26 Thread Julien Phalip
I'm keen to try to find some proper ways to fix this, but before I go too deep into the bowels of Django's testing framework, I was wondering what would be the criticisms you'd have about the "solution" I came up with (at the start of this thread)? It sort of works without patching Django, but is

Re: Testing dynamic apps

2008-11-26 Thread Rock
I took a similar path. I cloned the run_tests function from django.tests.simple.py and put it in my project directory as test_setup.py while adding this near the top of the function: if settings.TEST_APPS: settings.INSTALLED_APPS += settings.TEST_APPS That at least allows me to define

Re: Testing dynamic apps

2008-11-26 Thread Julien Phalip
On Nov 27, 10:55 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 8:33 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > So, all this works pretty well. The 'fakeapp' app is loaded > > dynamically, tables are created and the FakeItem model can be use in > > my

Re: Testing dynamic apps

2008-11-26 Thread Russell Keith-Magee
On Thu, Nov 27, 2008 at 8:33 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > So, all this works pretty well. The 'fakeapp' app is loaded > dynamically, tables are created and the FakeItem model can be use in > my tests. > > But it feels dirty. The dynamically created tables can potentially >

Testing dynamic apps

2008-11-26 Thread Julien Phalip
Hi, I have an app which allows users to rate/vote for any kind of object. Now, to test this app I need to have a fake model contained in a fake app. Here's the file structure of my app: myapp/ tests/ fakeapp/ __init__.py models.py __init__.py