You might wanna look into using the [1]Test Client. It allows you to
build the request and see what the response is, pretty nice actually.


[1] http://www.djangoproject.com/documentation/testing/#the-test-client

On May 22, 9:31 pm, "Viktor Nagy" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've a very simple views file, that I would like to test with doctests.
>
> For example a partial code is this:
> @require_POST
> def save(request, type):
>     '''
>     This adds a new element to the queue
>     >>> response = c.post('/queue/new/email', {'title': 'MyTitle'})
>     >>> response.status_code
>     200
>     >>> response = c.get('/queue/new/email/hello')
>
> But I just can't figure out how can I hook my views.py file into the
> testing system.
>
> Could someone give me a tests.py snippet that will do this?
>
> Thanks, V
--~--~---------~--~----~------------~-------~--~----~
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