#NEWLINE# def test_jwt_login_json( self ) : #NEWLINE# #INDENT# '\n        Ensure JWT login view using JSON POST works.\n        ' #NEWLINE# response = self . client . post ( '/auth-token/' , json . dumps ( self . data ) , content_type = 'application/json' ) #NEWLINE# response_content = json . loads ( smart_text ( response . content ) ) #NEWLINE# decoded_payload = utils . jwt_decode_handler ( response_content [ 'token' ] ) #NEWLINE# self . assertEqual ( response_content . status_code , 200 ) #NEWLINE# self . assertEqual ( decoded_payload [ 'username' ] , self . username )