Coverage for tests/fuzzy.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.5.4, created at 2024-06-23 20:15 +0000

1from factory.fuzzy import BaseFuzzyAttribute 

2from factory.random import randgen as factory_randgen 

3 

4 

5class FuzzyBytes(BaseFuzzyAttribute): 

6 def __init__(self): 

7 self.length = factory_randgen.randint(64, 1024) 

8 super().__init__() 

9 

10 def fuzz(self): 

11 return factory_randgen.randbytes(self.length)