How to use the mocket.mockredis.Redisizer.redisize function in mocket

To help you get started, we’ve selected a few mocket examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_int(self):
        self.assertEqual(Redisizer.redisize(10), b':10\r\n')
github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_text(self):
        self.assertEqual(
            Redisizer.redisize('☃'),
            b'$3\r\n\xe2\x98\x83\r\n'
        )
github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_command(self):
        self.assertEqual(
            Redisizer.redisize(Redisizer.command('OK')),
            b'+OK\r\n'
        )
github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_dict(self):
        self.assertEqual(
            Redisizer.redisize({'snowman': '☃'}),
            b'*2\r\n$7\r\nsnowman\r\n$3\r\n\xe2\x98\x83\r\n'
        )
github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_dict(self):
        self.assertEqual(
            Redisizer.redisize({'snowman': '☃'}),
            b'*2\r\n$7\r\nsnowman\r\n$3\r\n\xe2\x98\x83\r\n'
        )
github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_command(self):
        self.assertEqual(
            Redisizer.redisize(Redisizer.command('OK')),
            b'+OK\r\n'
        )
github mindflayer / python-mocket / tests / main / test_redis.py View on Github external
def test_redisize_text(self):
        self.assertEqual(
            Redisizer.redisize('☃'),
            b'$3\r\n\xe2\x98\x83\r\n'
        )