def METHOD_NAME(self):
    import random
    d = {}  # mirror the database
    for dummy in range(5):
        f = dumbdbm.open(_fname)
        for dummy in range(100):
            k = random.choice('abcdefghijklm')
            if random.random() < 0.2:
                if k in d:
                    del d[k]
                    del f[k]
            else:
                v = random.choice((b'a', b'b', b'c')) * random.randrange(10000)
                d[k] = v
                f[k] = v
                self.assertEqual(f[k], v)
        f.close()
        f = dumbdbm.open(_fname)
        expected = sorted((k.encode("latin-1"), v) for k, v in d.items())
        got = sorted(f.items())
        self.assertEqual(expected, got)
        f.close()