2019-03-22 17:58:30 +00:00
|
|
|
from . import utils
|
2014-12-23 02:19:44 +00:00
|
|
|
|
|
|
|
def test_generate():
|
|
|
|
FIVE_MB = 5 * 1024 * 1024
|
2023-01-21 19:05:46 +00:00
|
|
|
assert len(''.join(utils.generate_random(0))) == 0
|
|
|
|
assert len(''.join(utils.generate_random(1))) == 1
|
|
|
|
assert len(''.join(utils.generate_random(FIVE_MB - 1))) == FIVE_MB - 1
|
|
|
|
assert len(''.join(utils.generate_random(FIVE_MB))) == FIVE_MB
|
|
|
|
assert len(''.join(utils.generate_random(FIVE_MB + 1))) == FIVE_MB + 1
|