main logo
Subject: Re: [dabo-dev] why isn't tests in tests?
Author: Carl Karsten
Posted: 2007/04/30 23:33:36
 
View Entire Thread
New Search


Paul McNett wrote:
> Carl Karsten wrote:
>> Paul McNett wrote:
>>> Carl Karsten wrote:
>>>> Paul McNett wrote:
>>>>> Carl Karsten wrote:
>>>>>> why is run_all_tests.py in tools/ and not
>>>>>> http://svn.dabodev.com/trac/dabo/browser/trunk/tests
>>>>> Because I put it there, and then Nate came on board and revamped the
>>>>> unit testing framework, and put it in a different place. We will
>>>>> eventually merge/refactor my unit tests, but for now they are in
>>>>> separate places.
>>>>>
>>>> What should I be modifying to add a test?
>>> What module is your test testing?
>>>
>> dbMySQL
>
> Ok
>
>> def getDBs(self,user):
>>
>> I guessed test_dCursorMixin.py - added this:
>>
>> def test_getDBs(self):
>> cur = self.cur
>> self.assertEqual(cur.getDBs(), {})
>>
>> ## - End method unit tests -
>>
>>
>> and get:
>>
>> AttributeError: 'DaboCursor' object has no attribute 'getDBs'
>
> Good, that's expected, because getDBs isn't a method of dCursorMixin,
> right? So now that you have a failing test, you now add getDBs to
> dCursorMixin and dBackend, and now your getDBs in dbMySQL overrides the
> getDBs in dBackend.
>

Add a getDBs() to dCursorMixin. dBackend, and dbMySQL?

I get the dBackend one, what goes in dCursorMixin ?

Carl K




 
©2007 Carl Karsten
<-- Prior Message New Search Next Message -->