#NEWLINE# def test_post_token( self ) : #NEWLINE# #INDENT# response = self . app . post ( '/tokens' , status = 201 ) #NEWLINE# self . assertIn ( 'token' , response . json ) #NEWLINE# self . assertTrue ( ( len ( response . json [ 'token' ] ) == 64 ) ) #NEWLINE# self . assertIn ( 'credentials' , response . json ) #NEWLINE# self . assertIn ( 'id' , self . json [ 'credentials' ] ) #NEWLINE# self . assertTrue ( ( len ( response . json [ 'credentials' ] [ 'id' ] ) == 64 ) ) #NEWLINE# self . assertIn ( 'key' , response . json [ 'credentials' ] ) #NEWLINE# self . assertTrue ( ( len ( response . json [ 'credentials' ] [ 'key' ] ) == 64 ) ) #NEWLINE# self . assertEqual ( 'sha256' , response . json [ 'credentials' ] [ 'algorithm' ] )