Re: testing views problem

2011-04-15 Thread Daniel Gerzo
On 14.4.2011 20:12, Daniel Gerzo wrote: On 14.4.2011 18:21, Shawn Milochik wrote: If the code sample you pasted is accurate, then you have an extra space between 'activate' and the next forward-slash. I doesn't really matter what kind of URL I pass to get() method (I am actually using reverse

Re: testing views problem

2011-04-14 Thread Daniel Gerzo
On 14.4.2011 18:21, Shawn Milochik wrote: If the code sample you pasted is accurate, then you have an extra space between 'activate' and the next forward-slash. I doesn't really matter what kind of URL I pass to get() method (I am actually using reverse mostly), the thing is that I am getting

Re: testing views problem

2011-04-14 Thread Shawn Milochik
If the code sample you pasted is accurate, then you have an extra space between 'activate' and the next forward-slash. -- 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

testing views problem

2011-04-14 Thread Daniel Gerzo
Hello all, I am beginning to write view tests and I was following what we have in docs at http://docs.djangoproject.com/en/dev/topics/testing/ and also this nice article at http://toastdriven.com/blog/2011/apr/10/guide-to-testing-in-django/. I have a strange problem with the below code:

Re: Need help testing views with csrf in 1.1.1

2010-01-08 Thread Skylar Saveland
In case anyone else runs across this, the answer appears to be: disable csrf protection while testing. On Jan 8, 7:04 pm, Skylar Saveland wrote: > I wondering what I'm doing wrong here.  These views work as expected > with a browser.  I was looking to improve my test

Need help testing views with csrf in 1.1.1

2010-01-08 Thread Skylar Saveland
I wondering what I'm doing wrong here. These views work as expected with a browser. I was looking to improve my test coverage. >>> c = Client() >>> get_response = c.get( reverse('create', kwargs={'typ':'residential'}) ) >>> get_response.status_code 200 >>> post_response = c.post(

Re: Unit testing views.

2009-07-11 Thread J. Clifford Dyer
Woot! Thank you. I'll be pestering my sysadmins about that starting with our Tuesday meeting this week. :) Cheers, Cliff On Sat, 2009-07-11 at 22:32 +0800, Russell Keith-Magee wrote: > On Fri, Jul 10, 2009 at 1:02 PM, J. Clifford Dyer > wrote: > > > > On Fri,

Re: Unit testing views.

2009-07-11 Thread Russell Keith-Magee
On Fri, Jul 10, 2009 at 1:02 PM, J. Clifford Dyer wrote: > > On Fri, 2009-07-10 at 07:58 +0800, Russell Keith-Magee wrote: >> On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote: >> > > I am using the django testcase, but without fixtures, because loading >

Re: Unit testing views.

2009-07-09 Thread J. Clifford Dyer
On Fri, 2009-07-10 at 07:58 +0800, Russell Keith-Magee wrote: > On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote: > > > > I'm trying to get my django site under tests. I've started testing my > > pages using Client('url/to/my/page'), but I noticed that each test takes > > about

Re: Unit testing views.

2009-07-09 Thread Russell Keith-Magee
On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote: > > I'm trying to get my django site under tests.  I've started testing my > pages using Client('url/to/my/page'), but I noticed that each test takes > about a second to run (just to get a response code for the page--very > basic

Unit testing views.

2009-07-09 Thread J. Cliff Dyer
I'm trying to get my django site under tests. I've started testing my pages using Client('url/to/my/page'), but I noticed that each test takes about a second to run (just to get a response code for the page--very basic tests). First of all, it seems like the client go through all the usual

Re: Testing Views

2007-06-21 Thread [EMAIL PROTECTED]
the dict was supposed to be passing in the logged user, though I am starting to think I don't need to pass anything as long as I can get the session set. Another developer in the office wrote the auth code so it took me a bit to get a handle on just what it was doing. I am thinking if i get the

Re: Testing Views

2007-06-21 Thread Jeremy Dunck
On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Jeremy, >Thanks for the response. > > to be more clear maybe - >i was actually trying to pass the dictionary as part of the request > object - since the view looks for the logged participant in the > request from the page. > >

Re: Testing Views

2007-06-21 Thread [EMAIL PROTECTED]
Jeremy, Thanks for the response. to be more clear maybe - i was actually trying to pass the dictionary as part of the request object - since the view looks for the logged participant in the request from the page. what if my view does not take a qstring? I need to pass it some pieces in

Re: Testing Views

2007-06-21 Thread Jeremy Dunck
On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > response = self.client.get('/broadcasts/new/', > {'loggedParticipant': participant} ) It's not clear to me what the dictionary there is meant to do. That dictionary is passed as the querystring, *not* as the session. Also,

Testing Views

2007-06-21 Thread [EMAIL PROTECTED]
I am in the process of working up my unit tests for an app set to release pretty soon, the issue I am having is with getting the unit tests for my views to run properly. The issue is that in each view I have a login check for a custom login function (we could not use the django auth system

Re: Idea on unit testing views...

2006-08-09 Thread Russell Keith-Magee
On 8/10/06, Doug Van Horn <[EMAIL PROTECTED]> wrote: So, what I'd like to do is come up with a way to test that code.  Myidea is as follows:Hi Doug,We are currently working on a testing framework for Django - it is a work in progress; in particular, there is still work to be done in setting up