'L{LengthEnforcingConsumer.write} calls the wrapped consumer\'s C{write}
method with the bytes it is passed as long as there are fewer of them
than the C{length} attribute indicates remain to be received.'

def test_write(self):

    self.enforcer.write('abc')
    self.assertEqual(self.transport.value(), 'abc')
    self.transport.clear()
    self.enforcer.write('def')
    self.assertEqual(self.transport.value(), 'def')
