]> www.average.org Git - loctrkd.git/blob - test/test_fuzz_stream.py
tests: separate fuzz tests in two modules
[loctrkd.git] / test / test_fuzz_stream.py
1 """ Send junk to the collector """
2
3 import unittest
4 from .common import send_and_drain, TestWithServers, Fuzz
5
6 REPEAT: int = 1000000
7
8
9 class FuzzStream(Fuzz):
10     def test_stream(self) -> None:
11         for _ in range(REPEAT):
12             size = self.rnd.randint(1, 5000)
13             buf = self.rnd.randbytes(size)
14             send_and_drain(self.sock, buf)
15
16
17 if __name__ == "__main__":
18     unittest.main()