#NEWLINE# def test_assure_loadbalancer( self ) : #NEWLINE# #INDENT# class TestClient ( object ) : #NEWLINE# #INDENT# _manager = fakes . FakeManager ( ) #NEWLINE# @ assure_loadbalancer #NEWLINE# def test_method( self , loadbalancer ) : #NEWLINE# #INDENT# return loadbalancer #NEWLINE# #UNINDENT# #UNINDENT# client = TestClient ( ) #NEWLINE# client . _manager . get = Mock ( return_value = self . loadbalancer ) #NEWLINE# ret = client . test_method ( self . loadbalancer ) #NEWLINE# self . assertTrue ( ( ret is self . loadbalancer ) ) #NEWLINE# ret = client . test_method ( self . loadbalancer . id ) #NEWLINE# self . assertTrue ( ( ret is self . loadbalancer ) )