Example #1
0
    def bad_datas(self, value):
        val = value * 3

        def _alter_byte(byte_string, pos):
            old_val = indexbytes(byte_string, pos)
            new_byte = int2byte((old_val + 1 % 255))
            return byte_string[:pos] + new_byte + byte_string[pos + 1:]

        return (_alter_byte(val, i) for i in xrange(len(val)))
Example #2
0
    def bad_datas(self, value):
        val = value * 3

        def _alter_byte(byte_string, pos):
            old_val = indexbytes(byte_string, pos)
            new_byte = int2byte((old_val + 1 % 255))
            return byte_string[:pos] + new_byte + byte_string[pos + 1 :]

        return (_alter_byte(val, i) for i in xrange(len(val)))
Example #3
0
    def test_a_lot_of_puts(self, store, key, value):
        a_lot = 20

        for i in xrange(a_lot):
            key = key + '_{}'.format(i)
            store.put(key, value)
Example #4
0
    def test_a_lot_of_puts(self, store, key, value):
        a_lot = 20

        for i in xrange(a_lot):
            key = key + '_{}'.format(i)
            store.put(key, value)
Example #5
0
 def chunk_sizes(self, value):
     return [10**n for n in xrange(2, 8)]
Example #6
0
 def chunk_sizes(self, value):
     return [10 ** n for n in xrange(2, 8)]