#NEWLINE# def test_default( self ) : #NEWLINE# #INDENT# token = self . capability . generate_token ( ) #NEWLINE# self . assertNotEqual ( None , token ) #NEWLINE# decoded = jwt . decode ( token , self . auth_token ) #NEWLINE# self . assertNotEqual ( None , decoded ) #NEWLINE# policies = decoded [ 'policies' ] #NEWLINE# self . assertEqual ( len ( policies ) , 3 ) #NEWLINE# get_policy = policies [ 0 ] #NEWLINE# self . assertEqual ( 'https://event-bridge.twilio.com/v1/wschannels/AC123/WQ789' , get_policy [ 'url' ] ) #NEWLINE# self . assertEqual ( 'GET' , get_policy [ 'method' ] ) #NEWLINE# self . assertTrue ( get_policy [ 'allow' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , get_policy [ 'query_filter' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , get_policy [ 'post_filter' ] ) #NEWLINE# post_policy = policies [ 1 ] #NEWLINE# self . assertEqual ( 'https://event-bridge.twilio.com/v1/wschannels/AC123/WQ789' , post_policy [ 'url' ] ) #NEWLINE# self . assertEqual ( 'POST' , post_policy [ 'method' ] ) #NEWLINE# self . assertTrue ( post_policy [ 'allow' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , post_policy [ 'query_filter' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , post_policy [ 'post_filter' ] ) #NEWLINE# fetch_policy = policies [ 2 ] #NEWLINE# self . assertEqual ( 'https://taskrouter.twilio.com/v1/Workspaces/WS456/TaskQueues/WQ789' , fetch_policy [ 'url' ] ) #NEWLINE# self . assertEqual ( 'GET' , fetch_policy [ 'method' ] ) #NEWLINE# self . assertTrue ( fetch_policy [ 'allow' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , fetch_policy [ 'query_filter' ] ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , fetch_policy [ 'post_filter' ] )