def test_get_all_with_default_encoding_uses_utf8(self):
        redis = MagicMock()
        key = MagicMock()
        redis_hash = RedisHash(redis, key)

        result = redis_hash.get_all()

        redis.hgetall.assert_called_once_with(key, encoding='utf-8')
        self.assertEqual(result, redis.hgetall.return_value)
    def test_get_all_works_correctly(self):
        redis = MagicMock()
        key = MagicMock()
        redis_hash = RedisHash(redis, key)
        encoding = MagicMock()

        result = redis_hash.get_all(encoding=encoding)

        redis.hgetall.assert_called_once_with(key, encoding=encoding)
        self.assertEqual(result, redis.hgetall.return_value)