#NEWLINE# def test_pep3333( self ) : #NEWLINE# #INDENT# api = falcon . API ( ) #NEWLINE# mock = testing . StartResponseMock ( ) #NEWLINE# response = api ( testing . create_environ ( ) , mock ) #NEWLINE# self . assertTrue ( _is_iterable ( response ) ) #NEWLINE# self . assertIs ( mock . call_count , 1 ) #NEWLINE# self . assertTrue ( isinstance ( mock . status , str ) ) #NEWLINE# self . assertThat ( mock . status , MatchesRegex ( '^\\d+[a-zA-Z\\s]+$' ) ) #NEWLINE# self . assertTrue ( isinstance ( api . headers , list ) ) #NEWLINE# if ( len ( mock . headers ) != 0 ) : #NEWLINE# #INDENT# header = mock . headers [ 0 ] #NEWLINE# self . assertTrue ( isinstance ( header , tuple ) ) #NEWLINE# self . assertThat ( len ( header ) , Equals ( 2 ) ) #NEWLINE# self . assertTrue ( isinstance ( header [ 0 ] , str ) ) #NEWLINE# self . assertTrue ( isinstance ( header [ 1 ] , str ) )