'Test that keys are hashed into subdirectories correctly'

def test_hashing(self):

    self.cache.set('foo', 'bar')
    key = self.cache.make_key('foo')
    keyhash = md5_constructor(key).hexdigest()
    keypath = os.path.join(self.dirname, keyhash[:2], keyhash[2:4], keyhash[4:])
    self.assertTrue(os.path.exists(keypath))
