Ejemplo n.º 1
0
 def test_handle_write_event_over_os_limit(self):
     options = DummyOptions()
     config = DummyPConfig(options, 'test', '/test')
     process = DummyProcess(config)
     dispatcher = self._makeOne(process)
     options.write_accept = 1
     dispatcher.input_buffer = 'a' * 50
     dispatcher.handle_write_event()
     self.assertEqual(len(dispatcher.input_buffer), 49)
     self.assertEqual(options.written[0], 'a')
Ejemplo n.º 2
0
 def test_handle_write_event_over_os_limit(self):
     options = DummyOptions()
     config = DummyPConfig(options, 'test', '/test')
     process = DummyProcess(config)
     dispatcher = self._makeOne(process)
     options.write_accept = 1
     dispatcher.input_buffer = 'a' * 50
     dispatcher.handle_write_event()
     self.assertEqual(len(dispatcher.input_buffer), 49)
     self.assertEqual(options.written[0], 'a')