def test_mat_view_update_when_count_is_unknown(self): tableCursor = table1Cursor(self.context) mViewCursor = mView2Cursor(self.context) tableCursor.deleteAll() self.assertEquals(0, mViewCursor.count()) tableCursor.numb = 5 tableCursor.var = "A" tableCursor.insert() id1 = tableCursor.id tableCursor.clear() tableCursor.numb = 2 tableCursor.var = "A" tableCursor.insert() tableCursor.clear() mViewCursor.get("A") self.assertEquals(7, mViewCursor.s) tableCursor.setRange('numb', 2) tableCursor.first() tableCursor.numb = -5 tableCursor.update() tableCursor.clear() mViewCursor.get("A") self.assertEquals(0, mViewCursor.s) tableCursor.numb = 5 tableCursor.var = "A" tableCursor.insert() tableCursor.clear() mViewCursor.get("A") self.assertEquals(5, mViewCursor.s) tableCursor.get(id1) tableCursor.var = "B" tableCursor.update() tableCursor.clear() mViewCursor.get("A") self.assertEquals(0, mViewCursor.s) mViewCursor.get("B") self.assertEquals(5, mViewCursor.s)
def test_mat_view_delete(self): tableCursor = table1Cursor(self.context) mViewCursor = mView1Cursor(self.context) self._test_mat_view_delete(tableCursor, mViewCursor)
def test_mat_view_insert(self): tableCursor = table1Cursor(self.context) mViewCursor = mView1Cursor(self.context) self._test_mat_view_insert(tableCursor, mViewCursor)