#NEWLINE# def test_container_should_return_wrapped_object_if_possible( self ) : #NEWLINE# #INDENT# mock1 = mock . Mock ( WebDriver ) #NEWLINE# mock2 = mock . Mock ( WebElement ) #NEWLINE# iterable = [ mock1 , mock2 ] #NEWLINE# container = SeleniumContainerWrapper ( iterable ) #NEWLINE# wrapped1 = container . pop ( ) #NEWLINE# self . assertTrue ( isinstance ( container , SeleniumWrapper ) ) #NEWLINE# self . assertTrue ( hasattr ( wrapped1 , 'waitfor' ) ) #NEWLINE# wrapped2 = container . pop ( ) #NEWLINE# self . assertTrue ( isinstance ( wrapped2 , SeleniumWrapper ) ) #NEWLINE# self . assertTrue ( hasattr ( wrapped2 , 'waitfor' ) )