def setUp(self): self.wrapped = ClientFactory() self.wrapped.protocol = Discard self.factory = _TrafficLoggingFactory(self.wrapped)