<s> from __future__ import absolute_import , print_function <EOL> class FakeTransport ( object ) : <EOL> _written = b"<STR_LIT>" <EOL> _open = True <EOL> def write ( self , msg ) : <EOL> if not self . _open : <EOL> raise Exception ( "<STR_LIT>" ) <EOL> self . _written = self . _written + msg <EOL> def loseConnection ( self ) : <EOL> self . _open = False </s>
