Lines Matching refs:db
5 from test_all import db, dbobj, test_support, get_new_environment_path, \
19 del self.db
32 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
33 self.db = TestDB(self.env)
34 self.db.open(self.db_name, db.DB_HASH, db.DB_CREATE)
35 self.db.put('spam', 'eggs')
36 self.assertEqual(self.db.get('spam'), None,
38 self.assertEqual(self.db.get('SPAM'), 'eggs',
40 self.db.close()
45 self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
46 self.db = dbobj.DB(self.env)
47 self.db.open(self.db_name+'02', db.DB_HASH, db.DB_CREATE)
49 self.db['spam'] = 'eggs'
51 self.assertEqual(len(self.db), 1)
53 self.assertEqual(self.db['spam'], 'eggs')
55 del self.db['spam']
56 self.assertEqual(self.db.get('spam'), None, "dbobj __del__ failed")
57 self.db.close()
62 self.assertRaises(db.DBInvalidArgError, db.DB().type)