Carl Karsten wrote:
> I skimmed the tests you wrote, and got a bit lost.  I would like to add some, 
> but need a bit of direction.

Please do add some tests.

> What should I do to add a test that tests the UPDATE command?

You mean the sql-update command, which is called in dCursorMixin.save(). 
  So, you wouldn't be testing sql-update, but rather dCursorMixin.save() 
and/or dBizobj.save()/saveAll().

> Give me a rough version, I'll ask questions till I figure it out.
> once that loop is done, I'll summarize the thread  on the wiki.

Add a method to the Test_dCursorMixin class, named test_save(). Then do 
some operations and test the results of those operations. For example:

def test_save(self):
        cur = self.cur
        # Make a change:
        cur.Record.cField = "Mary Jane"
        cur.save()
        cur.requery()
        self.assertEqual(cur.Record.cField, "Mary Jane")

Of course, the test should also try changing multiple records, multiple 
fields, etc. etc.

-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to