diff --git a/s3tests/realistic.py b/s3tests/realistic.py index d025c91..41a0255 100644 --- a/s3tests/realistic.py +++ b/s3tests/realistic.py @@ -17,6 +17,11 @@ class RandomContentFile(object): self.digest = None self.last_read = 0 + assert self.size >= self.digest_size, "Can not create RandomContentFile: size ({size}) must be >= digest_size ({digest_size})".format( + size=self.size, + digest_size=self.digest_size + ) + def seek(self, offset): assert offset == 0 self.random.seed(self.seed)