-
Or rather, what's mysterious to me is why this test ever passed before. In http://trac.openplans.org/openplans/changeset/16643 I changed a test in oc-vacuum to assert somethign that looks more sensible to me. If we're testing the topnav for a logged-in user, I don't know why we'd expect to see "login" and "join" links. We should instead see a "logout" link. So that's what I changed it to do. Is there a reason it was the way it was before? If so, I'm wrong, and we have a new bug, and r16643 should be reverted. -- Paul Winkler http://www.openplans.org/people/slinkp/profile yahoo: slinkp23 AIM: slinkp1970
-
Okay, this gets weirder. The test fix I comitted in r16643 now fails - the top nav has reverted to its previous (wrong-looking to me) behavior. Does anybody have any idea what's going on? - PW On Wed, May 07, 2008 at 08:02:13PM -0400, Paul Winkler wrote: > Or rather, what's mysterious to me is why this test ever passed > before. > > In http://trac.openplans.org/openplans/changeset/16643 I changed a > test in oc-vacuum to assert somethign that looks more sensible to > me. If we're testing the topnav for a logged-in user, I don't know why > we'd expect to see "login" and "join" links. We should instead see a > "logout" link. So that's what I changed it to do. > > Is there a reason it was the way it was before? If so, I'm wrong, and > we have a new bug, and r16643 should be reverted. > > > -- > > Paul Winkler > http://www.openplans.org/people/slinkp/profile > yahoo: slinkp23 > AIM: slinkp1970 > > > -- > Archive: http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210206525293 > To unsubscribe send an email with subject unsubscribe to opencore-dev@.... Please contact opencore-dev-manager@... for questions. > > > !DSPAM:4043,482249d5151135332866982! > -- Paul Winkler http://www.openplans.org/people/slinkp/profile yahoo: slinkp23 AIM: slinkp1970
-
To understand what's going on hear, you really have to go back and look at the README.txt it was originally copied from. The key lines are: 387 Login [to be done] 388 389 >>> view.request.form['__ac_name'] = 'foobar' 390 >>> view.request.form['__ac_password'] = 'testy' 391 >>> output = view() When I looked at this stuff, no one could tell me what the missing steps were to make login actually work through the views (as opposed to the magic forcing of login through zope). If you know how to get a login working properly, than we should be able to fix these tests (among others)... Doug On May 8, 2008, at 12:23 PM, Paul Winkler wrote: > Okay, this gets weirder. The test fix I comitted in r16643 now fails > - the top nav has reverted to its previous (wrong-looking to me) > behavior. Does anybody have any idea what's going on? > > - PW > > On Wed, May 07, 2008 at 08:02:13PM -0400, Paul Winkler wrote: >> Or rather, what's mysterious to me is why this test ever passed >> before. >> >> In http://trac.openplans.org/openplans/changeset/16643 I changed a >> test in oc-vacuum to assert somethign that looks more sensible to >> me. If we're testing the topnav for a logged-in user, I don't know >> why >> we'd expect to see "login" and "join" links. We should instead see a >> "logout" link. So that's what I changed it to do. >> >> Is there a reason it was the way it was before? If so, I'm wrong, >> and >> we have a new bug, and r16643 should be reverted. >> >> >> -- >> >> Paul Winkler >> http://www.openplans.org/people/slinkp/profile >> yahoo: slinkp23 >> AIM: slinkp1970 >> >> >> -- >> Archive: http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210206525293 >> To unsubscribe send an email with subject unsubscribe to opencore-dev@... >> . Please contact opencore-dev-manager@... for >> questions. >> >> >> >> > > -- > > Paul Winkler > http://www.openplans.org/people/slinkp/profile > yahoo: slinkp23 > AIM: slinkp1970 > > > -- > Archive: http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210263829341 > To unsubscribe send an email with subject unsubscribe to opencore-dev@... > . Please contact opencore-dev-manager@... for > questions. > > > !DSPAM:4037,48232953178033327367457! >
-
Okay. Do you concur with my assessment about what the test should expect? On Thu, May 08, 2008 at 01:13:29PM -0400, Douglas Mayle wrote: > To understand what's going on hear, you really have to go back and look at > the README.txt it was originally copied from. The key lines are: > > 387 Login [to be done] > 388 > 389 >>> view.request.form['__ac_name'] = 'foobar' > 390 >>> view.request.form['__ac_password'] = 'testy' > 391 >>> output = view() > > When I looked at this stuff, no one could tell me what the missing steps > were to make login actually work through the views (as opposed to the magic > forcing of login through zope). If you know how to get a login working > properly, than we should be able to fix these tests (among others)... > > Doug > > > On May 8, 2008, at 12:23 PM, Paul Winkler wrote: > >> Okay, this gets weirder. The test fix I comitted in r16643 now fails >> - the top nav has reverted to its previous (wrong-looking to me) >> behavior. Does anybody have any idea what's going on? >> >> - PW >> >> On Wed, May 07, 2008 at 08:02:13PM -0400, Paul Winkler wrote: >>> Or rather, what's mysterious to me is why this test ever passed >>> before. >>> >>> In http://trac.openplans.org/openplans/changeset/16643 I changed a >>> test in oc-vacuum to assert somethign that looks more sensible to >>> me. If we're testing the topnav for a logged-in user, I don't know why >>> we'd expect to see "login" and "join" links. We should instead see a >>> "logout" link. So that's what I changed it to do. >>> >>> Is there a reason it was the way it was before? If so, I'm wrong, and >>> we have a new bug, and r16643 should be reverted. >>> >>> >>> -- >>> >>> Paul Winkler >>> http://www.openplans.org/people/slinkp/profile >>> yahoo: slinkp23 >>> AIM: slinkp1970 >>> >>> >>> -- >>> Archive: >>> http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210206525293 >>> To unsubscribe send an email with subject unsubscribe to >>> opencore-dev@.... Please contact >>> opencore-dev-manager@... for questions. >>> >>> >>> >>> >> >> -- >> >> Paul Winkler >> http://www.openplans.org/people/slinkp/profile >> yahoo: slinkp23 >> AIM: slinkp1970 >> >> >> -- >> Archive: >> http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210263829341 >> To unsubscribe send an email with subject unsubscribe to >> opencore-dev@.... Please contact >> opencore-dev-manager@... for questions. >> >> >> >> > > > > !DSPAM:4043,48233539209973668746562! -- Paul Winkler http://www.openplans.org/people/slinkp/profile yahoo: slinkp23 AIM: slinkp1970
-
100 percent. Doug On May 8, 2008, at 1:36 PM, Paul Winkler wrote: > Okay. Do you concur with my assessment about what the test should > expect? > > On Thu, May 08, 2008 at 01:13:29PM -0400, Douglas Mayle wrote: >> To understand what's going on hear, you really have to go back and >> look at >> the README.txt it was originally copied from. The key lines are: >> >> 387 Login [to be done] >> 388 >> 389 >>> view.request.form['__ac_name'] = 'foobar' >> 390 >>> view.request.form['__ac_password'] = 'testy' >> 391 >>> output = view() >> >> When I looked at this stuff, no one could tell me what the missing >> steps >> were to make login actually work through the views (as opposed to >> the magic >> forcing of login through zope). If you know how to get a login >> working >> properly, than we should be able to fix these tests (among others)... >> >> Doug >> >> >> On May 8, 2008, at 12:23 PM, Paul Winkler wrote: >> >>> Okay, this gets weirder. The test fix I comitted in r16643 now >>> fails >>> - the top nav has reverted to its previous (wrong-looking to me) >>> behavior. Does anybody have any idea what's going on? >>> >>> - PW >>> >>> On Wed, May 07, 2008 at 08:02:13PM -0400, Paul Winkler wrote: >>>> Or rather, what's mysterious to me is why this test ever passed >>>> before. >>>> >>>> In http://trac.openplans.org/openplans/changeset/16643 I changed a >>>> test in oc-vacuum to assert somethign that looks more sensible to >>>> me. If we're testing the topnav for a logged-in user, I don't >>>> know why >>>> we'd expect to see "login" and "join" links. We should instead >>>> see a >>>> "logout" link. So that's what I changed it to do. >>>> >>>> Is there a reason it was the way it was before? If so, I'm >>>> wrong, and >>>> we have a new bug, and r16643 should be reverted. >>>> >>>> >>>> -- >>>> >>>> Paul Winkler >>>> http://www.openplans.org/people/slinkp/profile >>>> yahoo: slinkp23 >>>> AIM: slinkp1970 >>>> >>>> >>>> -- >>>> Archive: >>>> http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210206525293 >>>> To unsubscribe send an email with subject unsubscribe to >>>> opencore-dev@.... Please contact >>>> opencore-dev-manager@... for questions. >>>> >>>> >>>> >>>> >>> >>> -- >>> >>> Paul Winkler >>> http://www.openplans.org/people/slinkp/profile >>> yahoo: slinkp23 >>> AIM: slinkp1970 >>> >>> >>> -- >>> Archive: >>> http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210263829341 >>> To unsubscribe send an email with subject unsubscribe to >>> opencore-dev@.... Please contact >>> opencore-dev-manager@... for questions. >>> >>> >>> >>> >> >> >> >> > > -- > > Paul Winkler > http://www.openplans.org/people/slinkp/profile > yahoo: slinkp23 > AIM: slinkp1970 > > > -- > Archive: http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210268189952 > To unsubscribe send an email with subject unsubscribe to opencore-dev@... > . Please contact opencore-dev-manager@... for > questions. > > > !DSPAM:4037,48233ada222541439371379! >
-
Well, it seems to have fixed itself again as of r16682. I'm guessing this is flip-flopping between success and failure as rmarianski's sputnik reorganization proceeds. On Thu, May 08, 2008 at 02:19:28PM -0400, Douglas Mayle wrote: > 100 percent. > > Doug > > > On May 8, 2008, at 1:36 PM, Paul Winkler wrote: > >> Okay. Do you concur with my assessment about what the test should >> expect? >> -- Paul Winkler http://www.openplans.org/people/slinkp/profile yahoo: slinkp23 AIM: slinkp1970
-
-
-
Douglas Mayle wrote: > To understand what's going on hear, you really have to go back and look > at the README.txt it was originally copied from. The key lines are: > > 387 Login *[to be done]* > 388 > 389 >>> view.request.form['__ac_name'] = 'foobar' > 390 >>> view.request.form['__ac_password'] = 'testy' > 391 >>> output = view() > > When I looked at this stuff, no one could tell me what the missing steps > were to make login actually work through the views (as opposed to the > magic forcing of login through zope). i don't understand this bit. what do you mean by making login work "through the views"? we have views that are designed to log you in (i.e. the ones that the login form submits to), and the test case classes have convenience methods if you want to log in as an arbitrary user while you're in a test case, but the idea of logging in "through" an arbitrary view makes no sense to me. if you clarify the need, i can probably help. -r
-
I mean, simulating a login the way a user would login in the tests. When you use the convenience methods to login, your bypassing our login interface, and rmarianski and I couldn't get our login interface to work in the tests. I think Jeff can be svn blamed for those lines of code below, but he had no memory of having ever touched that. Do you know how to use our login interface (the views with a request object) to log a user in? If not, we can't 1) test the login interface in doctests, and 2) test the logout interface (either the defualt, or the js based logout) in doctests. The logout js based interface is currently tested exclusively through flunc... Dug On May 8, 2008, at 3:19 PM, Rob Miller wrote: > Douglas Mayle wrote: >> To understand what's going on hear, you really have to go back and >> look at the README.txt it was originally copied from. The key >> lines are: >> 387 Login *[to be done]* >> 388 >> 389 >>> view.request.form['__ac_name'] = 'foobar' >> 390 >>> view.request.form['__ac_password'] = 'testy' >> 391 >>> output = view() >> When I looked at this stuff, no one could tell me what the missing >> steps were to make login actually work through the views (as >> opposed to the magic forcing of login through zope). > > i don't understand this bit. what do you mean by making login work > "through the views"? we have views that are designed to log you in > (i.e. the ones that the login form submits to), and the test case > classes have convenience methods if you want to log in as an > arbitrary user while you're in a test case, but the idea of logging > in "through" an arbitrary view makes no sense to me. > > if you clarify the need, i can probably help. > > -r > > > -- > Archive: http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210274271115 > To unsubscribe send an email with subject unsubscribe to opencore-dev@... > . Please contact opencore-dev-manager@... for > questions. > > > !DSPAM:4037,4823525c280101431913854! >
-
Douglas Mayle wrote: > I mean, simulating a login the way a user would login in the tests. > When you use the convenience methods to login, your bypassing our login > interface, and rmarianski and I couldn't get our login interface to work > in the tests. I think Jeff can be svn blamed for those lines of code > below, but he had no memory of having ever touched that. Do you know > how to use our login interface (the views with a request object) to log > a user in? If not, we can't 1) test the login interface in doctests, > and 2) test the logout interface (either the defualt, or the js based > logout) in doctests. The logout js based interface is currently tested > exclusively through flunc... ah, okay... if i'm understanding, you're talking about testing the login view itself. the problem is not in the tests... the tests are doing the right thing, which is exposing a bug in the view. you'll notice the following comment in the login method. from http://trac.openplans.org/openplans/browser/opencore/trunk/opencore/account/browser.py: # Note that login() doesn't actually seem to log us in during # the current request. eg. this next line self.membertool.setLoginTimes() # XXX does nothing, we're anonymous. i've fixed this already on the plone 3 branch: http://trac.openplans.org/openplans/browser/opencore/branches/plone3/opencore/account/browser.py http://trac.openplans.org/openplans/changeset/15988 hth, -r > > Dug > > On May 8, 2008, at 3:19 PM, Rob Miller wrote: > >> Douglas Mayle wrote: >>> To understand what's going on hear, you really have to go back and >>> look at the README.txt it was originally copied from. The key lines >>> are: >>> 387 Login *[to be done]* >>> 388 >>> 389 >>> view.request.form['__ac_name'] = 'foobar' >>> 390 >>> view.request.form['__ac_password'] = 'testy' >>> 391 >>> output = view() >>> When I looked at this stuff, no one could tell me what the missing >>> steps were to make login actually work through the views (as opposed >>> to the magic forcing of login through zope). >> >> i don't understand this bit. what do you mean by making login work >> "through the views"? we have views that are designed to log you in >> (i.e. the ones that the login form submits to), and the test case >> classes have convenience methods if you want to log in as an arbitrary >> user while you're in a test case, but the idea of logging in "through" >> an arbitrary view makes no sense to me. >> >> if you clarify the need, i can probably help. >> >> -r >> >> >> -- >> Archive: >> http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210274271115 >> >> To unsubscribe send an email with subject unsubscribe to >> opencore-dev@.... Please contact >> opencore-dev-manager@... for questions. >> >> >> !DSPAM:4037,4823525c280101431913854! >> > > > > -- > Archive: > http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/05/1210274908669 > > To unsubscribe send an email with subject unsubscribe to > opencore-dev@.... Please contact > opencore-dev-manager@... for questions. >
-
I've backported this to the opencore trunk, see r17398 - PW On Thu, May 08, 2008 at 12:56:55PM -0700, Rob Miller wrote: > the problem is not in the tests... the tests are doing the right thing, > which is exposing a bug in the view. you'll notice the following comment > in the login method. from > http://trac.openplans.org/openplans/browser/opencore/trunk/opencore/account/browser.py: > > # Note that login() doesn't actually seem to log us in during > # the current request. eg. this next line > self.membertool.setLoginTimes() # XXX does nothing, we're anonymous. > > > i've fixed this already on the plone 3 branch: > > http://trac.openplans.org/openplans/browser/opencore/branches/plone3/opencore/account/browser.py > http://trac.openplans.org/openplans/changeset/15988 > > hth, > > -r > -- Paul Winkler http://www.openplans.org/people/slinkp/profile yahoo: slinkp23 AIM: slinkp1970
-
-
-
-
-
text.html (text/html) 4.5 kB