Hi,

I've got a view which uses a different template depending on an input
parameter. For example:

def my_view(request, theme):
    ...
    return render_to_response('my_app/%s/page.html' %s theme, {...})

I would like to write some tests for this view, but I couldn't find
any clean way to do so. So far, the only way I've found was to create
a fake folder in the app's templates:

my_app/
    templates/
        my_app/
            test_blah/
                page.html
    models.py
    tests.py
    views.py

And then I can test the view by sending it the parameter 'test_blah'.
It works fine, but it means I have to ship my app with that dirty
"test_blah" folder.

Is there any other way to proceed?

Thanks a lot,

Julien
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to