Taras,

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



-- 
Andrés Riancho
Project Leader at w3af - http://w3af.org/
Web Application Attack and Audit Framework

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
W3af-develop mailing list
W3af-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/w3af-develop

Reply via email to