#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def test_stream_basic_permissions( self ) : #NEWLINE# #INDENT# ( code , response ) = ( yield self . mock_resource . trigger_get ( ( '/events?access_token=%s' % ( ( 'invalid' + self . token ) , ) ) ) ) #NEWLINE# self . assertEquals ( 403 , code , msg = str ( response ) ) #NEWLINE# ( code , response ) = ( yield self . mock_resource . trigger_get ( ( '/events?access_token=%s&timeout=0' % ( self . token , ) ) ) ) #NEWLINE# self . assertEquals ( 200 , code , msg = str ( response ) ) #NEWLINE# self . assertTrue ( ( 'chunk' in response ) ) #NEWLINE# self . assertTrue ( ( 'start' in response ) ) #NEWLINE# self . assertTrue ( ( 'end' in response ) )