Taras, On Mon, Apr 23, 2012 at 8:29 AM, Taras <ox...@oxdef.info> wrote: > Andres, > > >> Great, sounds good. Now you need to complete the items that are in the >> TODO list and we'll be done with that part. Did you had any luck >> reproducing the bug while running the tests? > > Nope, but I have found another interesting one with xrange and FileLock :)
Great, that's why unit-tests are great, I've learnt to love them :) > ERROR: test_tag (test_history.TestHistoryItem) > > > Traceback (most recent call last): > core/data/db/tests/test_history.py line 85 in test_tag > h1.save() > core/data/db/history.py line 318 in save > with FileLock(fname, timeout=1): > core/controllers/misc/FileLock.py line 87 in __enter__ > self.acquire() > core/controllers/misc/FileLock.py line 59 in acquire > self.fd = os.open(self.lockfile, os.O_CREAT|os.O_EXCL|os.O_RDWR) > OSError: [Errno 2] No such file or directory: > '/home/user/.w3af/tmp/7702/db_defaultSession-2012-Apr-23_15-27-54_traces/501.trace.lock' > > > >> >>> [0] core/data/db/tests/test_history.py >>> >>> >>>> On Tue, Apr 17, 2012 at 12:04 PM, Taras<ox...@oxdef.info> wrote: >>>>> >>>>> >>>>> Andres, >>>>> >>>>> how to correctly run these tests? DevGuide [0] is about doctest-tests, >>>>> isn't >>>>> it? >>>> >>>> >>>> >>>> Should work without any major issues with the same command, an example: >>>> >>>> dz0@dz0-laptop:~/w3af/trunk$ nosetests >>>> --doctest-result-variable=_test_res_ --rednose --with-doctest >>>> --doctest-tests core/data/db/tests/test_temp_shelve.py >>>> .. >>>> >>>> >>>> ----------------------------------------------------------------------------- >>>> 2 tests run in 3.2 seconds (2 tests passed) >>>> dz0@dz0-laptop:~/w3af/trunk$ nosetests >>>> --doctest-result-variable=_test_res_ --rednose --with-doctest >>>> --doctest-tests core/data/db/tests/ >>>> ......... >>>> >>>> >>>> ----------------------------------------------------------------------------- >>>> 9 tests run in 2.2 seconds (9 tests passed) >>>> dz0@dz0-laptop:~/w3af/trunk$ >>>> >>>> >>>>> [0] >>>>> http://sourceforge.net/apps/trac/w3af/wiki/developers-guide#Unittesting >>>>> >>>>> >>>>> On 04/16/2012 04:57 PM, Andres Riancho wrote: >>>>>> >>>>>> >>>>>> >>>>>> Taras, >>>>>> >>>>>> Given that the commit/retry bug and the __init__ issue were both >>>>>> in the same file (history.py) maybe it is a good idea to create the >>>>>> unit-test first and then continue with the bug? What might happen is >>>>>> that if your unit-test is good enough, you can reproduce the commit >>>>>> bug with it and then fix it? Just a though! >>>>>> >>>>>> Regards, >>>>>> >>>>>> On Sun, Apr 15, 2012 at 5:15 PM, Taras<ox...@oxdef.info> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Andres, >>>>>>> >>>>>>> Agree, after researching about bug with commit error I will do it. >>>>>>> >>>>>>> >>>>>>> On 04/14/2012 04:27 AM, Andres Riancho wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Taras, >>>>>>>> >>>>>>>> Given that this class has become a very important part of the >>>>>>>> framework, could you please write some unit-tests around it so we >>>>>>>> can >>>>>>>> make sure that things like this don't happen again? I recommend >>>>>>>> using >>>>>>>> core/data/db/tests/test_temp_persist.py as a base and locate your >>>>>>>> unit-test at core/data/db/tests/test_history.py >>>>>>>> >>>>>>>> Thanks! >>>>>>>> >>>>>>>> Regards, >>>>>>>> >>>>>>>> On Fri, Apr 13, 2012 at 9:24 PM, w3af<nore...@sourceforge.net> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> #171589: [Auto-Generated] Bug Report - TypeError: __init__() takes >>>>>>>>> exactly 1 >>>>>>>>> argument (2 given) >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -----------------------------------+---------------------------------------- >>>>>>>>> Reporter: w3afbugsreport | Owner: andresriancho >>>>>>>>> Type: defect | Status: closed >>>>>>>>> Priority: major | Milestone: >>>>>>>>> Component: automatic-bug-report | Version: >>>>>>>>> Resolution: fixed | Keywords: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -----------------------------------+---------------------------------------- >>>>>>>>> Changes (by andresriancho): >>>>>>>>> >>>>>>>>> * status: new => closed >>>>>>>>> * resolution: => fixed >>>>>>>>> >>>>>>>>> >>>>>>>>> Old description: >>>>>>>>> >>>>>>>>>> == User description: == >>>>>>>>>> What steps will reproduce the problem? >>>>>>>>>> 1. >>>>>>>>>> 2. >>>>>>>>>> 3. >>>>>>>>>> >>>>>>>>>> What is the expected output? What do you see instead? >>>>>>>>>> >>>>>>>>> >>>>>>>>>> What operating system are you using? >>>>>>>>>> >>>>>>>>> >>>>>>>>>> Please provide any additional information below: >>>>>>>>>> >>>>>>>>> >>>>>>>>>> >>>>>>>>>> [[BR]][[BR]] >>>>>>>>>> == Version Information: == >>>>>>>>>> {{{ >>>>>>>>>> >>>>>>>>>> Python version: >>>>>>>>>> 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) >>>>>>>>>> [GCC 4.4.3] >>>>>>>>>> >>>>>>>>>> GTK version:2.20.1 >>>>>>>>>> PyGTK version:2.17.0 >>>>>>>>>> >>>>>>>>> >>>>>>>>>> w3af - Web Application Attack and Audit Framework >>>>>>>>>> Version: 1.2 >>>>>>>>>> Revision: 4882 >>>>>>>>>> Author: Andres Riancho and the w3af team. >>>>>>>>>> >>>>>>>>>> }}} >>>>>>>>>> [[BR]][[BR]] >>>>>>>>>> == Traceback: == >>>>>>>>>> {{{ >>>>>>>>>> Traceback (most recent call last): >>>>>>>>>> File "/pentest/web/w3af/core/ui/gtkUi/httpLogTab.py", line 309, >>>>>>>>>> in >>>>>>>>>> refreshResults >>>>>>>>>> self.findRequestResponse(refresh=True) >>>>>>>>>> File "/pentest/web/w3af/core/ui/gtkUi/httpLogTab.py", line 376, >>>>>>>>>> in >>>>>>>>>> findRequestResponse >>>>>>>>>> resultLimit=5001, orderData=[("id","")]) >>>>>>>>>> File "/pentest/web/w3af/core/data/db/history.py", line 166, in >>>>>>>>>> find >>>>>>>>>> item = self.__class__(self._db) >>>>>>>>>> TypeError: __init__() takes exactly 1 argument (2 given) >>>>>>>>>> >>>>>>>>>> }}} >>>>>>>>>> == Enabled Plugins: == >>>>>>>>>> {{{ >>>>>>>>>> >>>>>>>>>> }}} >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> New description: >>>>>>>>> >>>>>>>>> == User description: == >>>>>>>>> What steps will reproduce the problem? >>>>>>>>> 1. >>>>>>>>> 2. >>>>>>>>> 3. >>>>>>>>> >>>>>>>>> What is the expected output? What do you see instead? >>>>>>>>> >>>>>>>>> >>>>>>>>> What operating system are you using? >>>>>>>>> >>>>>>>>> >>>>>>>>> Please provide any additional information below: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> [[BR]][[BR]] >>>>>>>>> == Version Information: == >>>>>>>>> {{{ >>>>>>>>> >>>>>>>>> Python version: >>>>>>>>> 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) >>>>>>>>> [GCC 4.4.3] >>>>>>>>> >>>>>>>>> GTK version:2.20.1 >>>>>>>>> PyGTK version:2.17.0 >>>>>>>>> >>>>>>>>> >>>>>>>>> w3af - Web Application Attack and Audit Framework >>>>>>>>> Version: 1.2 >>>>>>>>> Revision: 4882 >>>>>>>>> Author: Andres Riancho and the w3af team. >>>>>>>>> >>>>>>>>> }}} >>>>>>>>> [[BR]][[BR]] >>>>>>>>> == Traceback: == >>>>>>>>> {{{ >>>>>>>>> Traceback (most recent call last): >>>>>>>>> File "/pentest/web/w3af/core/ui/gtkUi/httpLogTab.py", line 309, >>>>>>>>> in >>>>>>>>> refreshResults >>>>>>>>> self.findRequestResponse(refresh=True) >>>>>>>>> File "/pentest/web/w3af/core/ui/gtkUi/httpLogTab.py", line 376, >>>>>>>>> in >>>>>>>>> findRequestResponse >>>>>>>>> resultLimit=5001, orderData=[("id","")]) >>>>>>>>> File "/pentest/web/w3af/core/data/db/history.py", line 166, in >>>>>>>>> find >>>>>>>>> item = self.__class__(self._db) >>>>>>>>> TypeError: __init__() takes exactly 1 argument (2 given) >>>>>>>>> >>>>>>>>> }}} >>>>>>>>> == Enabled Plugins: == >>>>>>>>> {{{ >>>>>>>>> >>>>>>>>> }}} >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> Comment: >>>>>>>>> >>>>>>>>> Fixed in r4883. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Ticket >>>>>>>>> URL:<http://sourceforge.net/apps/trac/w3af/ticket/171589#comment:1> >>>>>>>>> w3af<http://sourceforge.net/projects/w3af/> >>>>>>>>> w3af - Web Application Attack and Audit Framework. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Taras >>>>>>> http://oxdef.info >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Taras >>>>> http://oxdef.info >>>> >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Taras >>> http://oxdef.info >> >> >> >> > > > -- > Taras > http://oxdef.info -- Andrés Riancho Project Leader at w3af - http://w3af.org/ Web Application Attack and Audit Framework ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ W3af-develop mailing list W3af-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/w3af-develop