On 4/30/07, Carl Karsten <[EMAIL PROTECTED]> 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 > 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'
Sounds like a unitTest. It sounds like you want to test the getDBs method. For now, either place is fine. If you leave it in Paul's setup, it will be easier to detirmine what type of test (integration or unit) it is and where it needs to go. This method seems like it crosses layers to get the database information. If this is the case, you really need to mock the db layer for the unit tests so it doesn't take up too much time. If it is an integration tests the db layer should be the real thing. As for the error, check to see if you spelled the method right because the error is saying that you are trying to call a non-existant method. Cheers, Nate L. > > Carl K > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]
