def METHOD_NAME(self):
    self.d = dbm.open(self.filename, 'c')
    self.assertEqual(self.d.keys(), [])
    a = [(b'a', b'b'), (b'12345678910', b'019237410982340912840198242')]
    for k, v in a:
        self.d[k] = v
    self.assertEqual(sorted(self.d.keys()), sorted(k for (k, v) in a))
    for k, v in a:
        self.assertIn(k, self.d)
        self.assertEqual(self.d[k], v)
    self.assertNotIn(b'xxx', self.d)
    self.assertRaises(KeyError, lambda: self.d[b'xxx'])
    self.d.close()