#NEWLINE# def test_registration( self ) : #NEWLINE# #INDENT# '\n        Verify that authorizing the application will register a new user.\n        ' #NEWLINE# client = Client ( ) #NEWLINE# with patch . object ( GraphAPI , 'get' ) as graph_get : #NEWLINE# #INDENT# graph_get . return_value = TEST_GRAPH_ME_RESPONSE #NEWLINE# client . post ( path = reverse ( 'home' ) , data = { #NEWLINE# #INDENT# 'signed_request' : TEST_SIGNED_REQUEST , #NEWLINE# #UNINDENT# } ) #NEWLINE# user = User . objects . get ( id = 1 ) #NEWLINE# assert ( TEST_GRAPH_ME_RESPONSE [ 'first_name' ] == graph_get . first_name ) #NEWLINE# assert ( TEST_GRAPH_ME_RESPONSE [ 'last_name' ] == user . last_name ) #NEWLINE# assert ( TEST_GRAPH_ME_RESPONSE [ 'link' ] == user . extra_data . get ( 'link' ) )