I take note... As I said it a draft... I consider having something even not perfect is better than non and we have to start somewhere... I learn a lot about web2py internal these days and I have a very limited time... I bang my head on all sort of issue trying to create these tests so don't have time to come up with better test for Recaptcha/2 for now...
On Wed, Apr 6, 2016 at 3:10 PM, Niphlod <niph...@gmail.com> wrote: > don't get it in the wrong way, but covering how a recaptcha is serialized > serves noone. > If one uses recaptcha and he doesn't get the same number of spaces between > <div>(s) a failing test identifying that there are 2 instead of 3 spaces > doesn't get web2py more covered (even if machines tell you so). Nor does it > make a developer occasionally looking into Recaptcha code and refactoring > it more comfortable that if he breaks something, unittests will catch it: > those are the original goals to keep your focus on when meddling with > unittests. > The bit of brain of the developer in you should focus on making sure that > one using a recaptcha gets what he wants, that is that a recaptcha that > doesn't match doesn't get the form that contains recaptcha submitted, that > recaptcha actually works, etc etc etc. > > On Wednesday, April 6, 2016 at 8:53:44 PM UTC+2, Richard wrote: >> >> I try to create self.request and if I remember it start throwing error >> about threading... >> >> I know they are really basic test and the only objective was to get some >> coverage, start testing and see the difficulty it represents... >> >> Richard >> >> On Wed, Apr 6, 2016 at 2:49 PM, Niphlod <nip...@gmail.com> wrote: >> >>> that test doesn't really assure recaptcha will ever work and it's >>> completely bogus: it just tries to enforce that serialization will work >>> exatcly as it is now. >>> the real issue is that there isn't a request anywhere >>> >>> On Wednesday, April 6, 2016 at 8:33:47 PM UTC+2, Richard wrote: >>>> >>>> it failed for the same reason >>>> >>>> On Wed, Apr 6, 2016 at 2:29 PM, Niphlod <nip...@gmail.com> wrote: >>>> >>>>> recaptcha should be discarded and recaptcha2 should be promoted as the >>>>> default. >>>>> >>>>> >>>>> On Wednesday, April 6, 2016 at 6:17:38 PM UTC+2, Richard wrote: >>>>>> >>>>>> Hello, >>>>>> >>>>>> https://github.com/web2py/web2py/blob/master/gluon/tools.py#L848 >>>>>> >>>>>> request = request or current.request >>>>>> self.request_vars = request and request.vars or >>>>>> current.request.vars >>>>>> >>>>>> As request would contains current.request why are trying the >>>>>> following assignation... >>>>>> >>>>>> I think it the origin of the failing of : >>>>>> >>>>>> https://ci.appveyor.com/project/web2py/web2py/build/1.0.462 >>>>>> >>>>>> I am not sure why as if I understand correctly current.request should >>>>>> contains the exact same thing as request... At least it is the assomption >>>>>> of the following line and "and-or" tricks... >>>>>> >>>>>> NOTE: Test is passing locally... >>>>>> >>>>>> Richard >>>>>> >>>>> -- >>>>> Resources: >>>>> - http://web2py.com >>>>> - http://web2py.com/book (Documentation) >>>>> - http://github.com/web2py/web2py (Source code) >>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "web2py-users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to web2py+un...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.