Returns random unicode text data exceeding the size threshold for chunking blob upload.
(self, size)
| 111 | return bytes(result) |
| 112 | |
| 113 | def get_random_text_data(self, size): |
| 114 | '''Returns random unicode text data exceeding the size threshold for |
| 115 | chunking blob upload.''' |
| 116 | checksum = zlib.adler32(self.qualified_test_name.encode()) & 0xffffffff |
| 117 | rand = random.Random(checksum) |
| 118 | text = u'' |
| 119 | words = [u'hello', u'world', u'python', u'啊齄丂狛狜'] |
| 120 | while (len(text) < size): |
| 121 | index = int(rand.random()*(len(words) - 1)) |
| 122 | text = text + u' ' + words[index] |
| 123 | |
| 124 | return text |
| 125 | |
| 126 | @staticmethod |
| 127 | def _set_test_proxy(service, settings): |
no outgoing calls
no test coverage detected