#NEWLINE# def test_as_context( self ) : #NEWLINE# #INDENT# c = BaseClient ( Mock ( name = 'hub' ) ) #NEWLINE# c . close = Mock ( name = 'close' ) #NEWLINE# with c : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# c . close . assert_called_with ( )