def setUp(self): self.server_addr = ('127.0.0.2', 55000) self.client_addr = ('127.0.0.3', 55001) # shaping init ShaperMixin.setUp(self) ServerMixin.run_server(self) with open('/dev/urandom', 'rb') as f: self.randomfile = bytearray(f.read(self.filesize))
def tearDown(self): ShaperMixin.tearDown(self)
def setUp(self): self.server_addr = ('127.0.0.2', 55000) # 5 ms delay self.client_addr = ('127.0.0.3', 55001) # 30 ms delay ShaperMixin.setUp(self)
def tearDown(self): if hasattr(self, 'sock_client'): self.sock_client.close() ShaperMixin.tearDown(self)