#NEWLINE# def test_client_register( self ) : #NEWLINE# #INDENT# c = Consumer ( None , None ) #NEWLINE# c . application_type = 'web' #NEWLINE# c . application_name = 'My super service' #NEWLINE# c . redirect_uris = [ 'http://example.com/authz' ] #NEWLINE# c . contact = [ 'foo@example.com' ] #NEWLINE# mfos = MyFakeOICServer ( 'http://example.com' ) #NEWLINE# mfos . keyjar = SRVKEYS #NEWLINE# c . http_request = mfos . http_request #NEWLINE# location = c . discover ( 'foo@example.com' ) #NEWLINE# info = c . provider_config ( location ) #NEWLINE# c . register ( info [ 'registration_endpoint' ] ) #NEWLINE# assert ( c . client_id is not None ) #NEWLINE# assert ( c . client_secret is not None ) #NEWLINE# assert ( location . registration_expires > utc_time_sans_frac ( ) )